SECTION "ROM Bank 18", ROMX[$4000], BANK[$18]

    db   $FA, $16, $C1, $A7, $20, $09, $3C, $EA
    db   $16, $C1, $3E, $14, $EA, $FF, $D6, $F0
    db   $EE, $FE, $48, $C2, $78, $43, $CD, $5E
    db   $43, $CD, $AF, $7C, $F0, $F0, $C7

    dw JumpTable_402D_18 ; 00

    db   $98, $40, $D9, $40, $CE, $41, $55, $42
    db   $6E, $42, $A9, $42

JumpTable_402D_18:
    clear [$D201]
    ld   a, [$DB49]
    and  %00000001
    jr   z, .else_18_404A

    ld   a, [hLinkPositionY]
    ld   hl, $FFEF
    sub  a, [hl]
    add  a, $28
    cp   80
    call toc_18_7D0E.toc_18_7D19
    jr   nc, .else_18_407C

    jp   toc_18_42B6

JumpTable_402D_18.else_18_404A:
    ifGte [hLinkPositionY], 76, .else_18_407C

    assign [hLinkPositionY], $4C
    call toc_01_1495
    call toc_01_093B
    ld   e, $0B
    ld   hl, $DB00
JumpTable_402D_18.loop_18_405F:
    ldi  a, [hl]
    cp   $09
    jr   z, .else_18_4074

    dec  e
    ld   a, e
    cp   $FF
    jr   nz, .loop_18_405F

    ld   a, $DB
    call toc_18_4088
    call JumpTable_3B8D_00
    ld   [hl], b
    ret


JumpTable_402D_18.else_18_4074:
    ld   a, $DC
    call toc_18_4088
    call JumpTable_3B8D_00
JumpTable_402D_18.else_18_407C:
    ld   a, [hFrameCounter]
    rra
    rra
    rra
    rra
    and  %00000001
    call toc_01_3B87
    ret


toc_18_4088:
    ld   e, a
    ld   a, [hLinkPositionY]
    push af
    assign [hLinkPositionY], $10
    ld   a, e
    call toc_01_2197
    pop  af
    ld   [hLinkPositionY], a
    ret


    db   $CD, $7C, $40, $FA, $9F, $C1, $A7, $20
    db   $37, $CD, $8D, $3B, $FA, $77, $C1, $A7
    db   $28, $07, $70, $3E, $DE, $CD, $88, $40
    db   $C9, $FA, $5D, $DB, $FE, $03, $38, $F2
    db   $FA, $92, $DB, $C6, $2C, $EA, $92, $DB
    db   $FA, $91, $DB, $CE, $01, $EA, $91, $DB
    db   $CD, $91, $08, $36, $FF, $CD, $D2, $27
    db   $CD, $C1, $45, $3E, $01, $EA, $00, $C5
    db   $C9, $3E, $02, $E0, $A1, $EA, $67, $C1
    db   $CD, $91, $08, $20, $0D, $3E, $35, $EA
    db   $68, $D3, $3E, $01, $EA, $15, $D2, $C3
    db   $8D, $3B, $C9, $3E, $30, $E0, $CD, $3E
    db   $18, $E0, $CE, $C3, $B5, $44, $3E, $30
    db   $E0, $CD, $3E, $68, $E0, $CE, $C3, $B5
    db   $44, $3E, $38, $E0, $CE, $3E, $08, $E0
    db   $CD, $C3, $09, $44, $3E, $38, $E0, $CE
    db   $3E, $08, $E0, $CD, $C3, $5E, $44, $C9
    db   $03, $03, $03, $03, $03, $03, $03, $01
    db   $02, $04, $03, $01, $02, $04, $03, $01
    db   $02, $04, $03, $01, $02, $04, $03, $01
    db   $02, $04, $03, $03, $03, $03, $03, $04
    db   $03, $01, $02, $04, $03, $01, $02, $04
    db   $03, $01, $02, $04, $03, $01, $02, $04
    db   $03, $01, $02, $02, $02, $02, $02, $02
    db   $02, $02, $01, $01, $05, $05, $05, $05
    db   $05, $05, $01, $01, $04, $01, $05, $01
    db   $04, $01, $05, $01, $04, $01, $05, $01
    db   $04, $01, $05, $01, $04, $01, $05, $05
    db   $05, $05, $01, $01, $05, $01, $04, $01
    db   $05, $01, $04, $01, $05, $01, $04, $01
    db   $05, $01, $04, $01, $05, $01, $04, $04
    db   $04, $04, $04, $04, $01, $01, $01, $01
    db   $05, $05, $05, $05, $01, $01, $01, $01
    db   $04, $01, $05, $01, $04, $01, $05, $01
    db   $04, $01, $05, $01, $04, $01, $05, $01
    db   $04, $01, $05, $05, $01, $01, $01, $01
    db   $05, $01, $04, $01, $05, $01, $04, $01
    db   $05, $01, $04, $01, $05, $01, $04, $01
    db   $05, $01, $04, $04, $04, $04, $3E, $02
    db   $E0, $A1, $EA, $67, $C1, $FA, $11, $D2
    db   $A7, $20, $20, $FA, $10, $D2, $FE, $00
    db   $CC, $09, $41, $FA, $10, $D2, $FE, $01
    db   $CC, $14, $41, $FA, $10, $D2, $FE, $38
    db   $CC, $F3, $40, $FA, $10, $D2, $FE, $70
    db   $CC, $FE, $40, $FA, $10, $D2, $C6, $01
    db   $EA, $10, $D2, $5F, $FA, $11, $D2, $CE
    db   $00, $EA, $11, $D2, $57, $FE, $06, $20
    db   $12, $7B, $FE, $20, $20, $0D, $3E, $DD
    db   $CD, $88, $40, $AF, $EA, $00, $C5, $CD
    db   $8D, $3B, $C9, $FA, $12, $D2, $3C, $FE
    db   $1C, $20, $08, $FA, $13, $D2, $3C, $EA
    db   $13, $D2, $AF, $EA, $12, $D2, $FA, $13
    db   $D2, $5F, $50, $21, $20, $41, $19, $7E
    db   $CD, $87, $3B, $21, $5A, $41, $19, $7E
    db   $EA, $B1, $C3, $21, $94, $41, $19, $7E
    db   $EA, $B2, $C3, $C9, $C9, $FA, $9F, $C1
    db   $A7, $20, $10, $EA, $15, $D2, $CD, $91
    db   $08, $36, $70, $3E, $10, $EA, $68, $D3
    db   $CD, $8D, $3B, $C3, $7C, $40, $CD, $91
    db   $08, $20, $0E, $3E, $02, $EA, $4A, $DB
    db   $21, $49, $DB, $CB, $C6, $CD, $8D, $3B
    db   $C9, $FE, $08, $20, $06, $35, $3E, $DF
    db   $CD, $88, $40, $3E, $6C, $E0, $9D, $3E
    db   $02, $E0, $A1, $F0, $98, $E0, $EE, $F0
    db   $99, $D6, $0C, $E0, $EC, $11, $6C, $47
    db   $AF, $E0, $F1, $CD, $D0, $3C, $C3, $7C
    db   $40, $FA, $9F, $C1, $A7, $20, $0C, $EA
    db   $67, $C1, $CD, $8D, $3B, $70

toc_18_42B6:
    ld   a, $E0
    call toc_18_4088
    jp   JumpTable_402D_18.else_18_407C

    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $10, $64, $00, $00, $18, $66, $00
    db   $10, $00, $68, $00, $10, $08, $6A, $00
    db   $10, $10, $6C, $00, $10, $18, $6E, $00
    db   $00, $00, $70, $00, $00, $08, $72, $00
    db   $00, $10, $74, $00, $00, $18, $76, $00
    db   $10, $00, $68, $00, $10, $08, $6A, $00
    db   $10, $10, $6C, $00, $10, $18, $6E, $00
    db   $00, $00, $78, $00, $00, $08, $7A, $00
    db   $00, $10, $7C, $00, $00, $18, $7E, $00
    db   $10, $00, $68, $00, $10, $08, $6A, $00
    db   $10, $10, $6C, $00, $10, $18, $6E, $00
    db   $00, $00, $7E, $20, $00, $08, $7C, $20
    db   $00, $10, $7A, $20, $00, $18, $78, $20
    db   $10, $00, $6E, $20, $10, $08, $6C, $20
    db   $10, $10, $6A, $20, $10, $18, $68, $20
    db   $00, $00, $76, $20, $00, $08, $74, $20
    db   $00, $10, $72, $20, $00, $18, $70, $20
    db   $10, $00, $6E, $20, $10, $08, $6C, $20
    db   $10, $10, $6A, $20, $10, $18, $68, $20
    db   $F0, $F1, $17, $17, $17, $17, $17, $E6
    db   $E0, $5F, $50, $21, $BE, $42, $19, $0E
    db   $08, $CD, $26, $3D, $3E, $04, $CD, $D0
    db   $3D, $C9, $21, $10, $C2, $09, $36, $4A
    db   $21, $50, $C3, $09, $36, $98, $CD, $65
    db   $3B, $CD, $E9, $43, $CD, $AF, $7C, $F0
    db   $F0, $C7

    dw JumpTable_4394_18 ; 00

    db   $9F, $43

JumpTable_4394_18:
    call toc_01_27ED
    ld   hl, $C3D0
    add  hl, bc
    ld   [hl], a
    call JumpTable_3B8D_00
    ld   a, [$D215]
    and  a
    jp   nz, .return_18_43B8

    ld   hl, $C3D0
    add  hl, bc
    inc  [hl]
    ld   a, [hl]
    ld   e, $00
    and  %00110000
    jr   z, .else_18_43B3

    inc  e
JumpTable_4394_18.else_18_43B3:
    ld   a, e
    call toc_01_3B87
    ret


JumpTable_4394_18.return_18_43B8:
    ret


    db   $58, $00, $58, $20, $5A, $00, $5A, $20
    db   $5C, $00, $5E, $00, $5E, $20, $5C, $20
    db   $F0, $00, $50, $00, $F0, $08, $52, $00
    db   $00, $00, $54, $00, $00, $08, $56, $00
    db   $F0, $00, $52, $20, $F0, $08, $50, $20
    db   $00, $00, $56, $20, $00, $08, $54, $20
    db   $F0, $F1, $FE, $04, $30, $06, $11, $B9
    db   $43, $C3, $3B, $3C, $D6, $04, $17, $17
    db   $17, $17, $E6, $F0, $5F, $50, $21, $C9
    db   $43, $19, $0E, $04, $CD, $26, $3D, $C9
    db   $CD, $39, $28, $3E, $1B, $EA, $00, $D6
    db   $21, $01, $D6, $F0, $CF, $C6, $02, $5F
    db   $22, $F0, $D0, $22, $3E, $85, $22, $3E
    db   $00, $22, $3E, $04, $22, $3E, $7F, $22
    db   $3E, $7F, $22, $3E, $06, $22, $3E, $0C
    db   $22, $7B, $22, $F0, $D0, $C6, $01, $22
    db   $3E, $85, $22, $3E, $01, $22, $3E, $7F
    db   $22, $3E, $7F, $22, $3E, $7F, $22, $3E
    db   $7F, $22, $3E, $0D, $22, $7B, $22, $F0
    db   $D0, $C6, $02, $22, $3E, $C5, $22, $3E
    db   $7F, $22, $36, $00, $C9, $CD, $39, $28
    db   $3E, $1B, $EA, $00, $D6, $21, $01, $D6
    db   $F0, $CF, $C6, $02, $5F, $22, $F0, $D0
    db   $C6, $03, $22, $3E, $C5, $22, $3E, $7F
    db   $22, $7B, $22, $F0, $D0, $C6, $04, $22
    db   $3E, $85, $22, $3E, $02, $22, $3E, $7F
    db   $22, $3E, $7F, $22, $3E, $7F, $22, $3E
    db   $7F, $22, $3E, $0E, $22, $7B, $22, $F0
    db   $D0, $C6, $05, $22, $3E, $85, $22, $3E
    db   $03, $22, $3E, $05, $22, $3E, $7F, $22
    db   $3E, $7F, $22, $3E, $07, $22, $3E, $0F
    db   $22, $36, $00, $C9, $CD, $39, $28, $3E
    db   $15, $EA, $00, $D6, $21, $01, $D6, $F0
    db   $CF, $C6, $02, $5F, $22, $F0, $D0, $22
    db   $3E, $83, $22, $3E, $00, $22, $3E, $04
    db   $22, $3E, $06, $22, $3E, $0C, $22, $7B
    db   $22, $F0, $D0, $C6, $01, $22, $3E, $83
    db   $22, $3E, $01, $22, $3E, $7F, $22, $3E
    db   $7F, $22, $3E, $0D, $22, $7B, $22, $F0
    db   $D0, $C6, $02, $22, $3E, $83, $22, $3E
    db   $02, $22, $3E, $7F, $22, $3E, $7F, $22
    db   $3E, $0E, $22, $7B, $22, $F0, $D0, $C6
    db   $03, $22, $3E, $83, $22, $3E, $03, $22
    db   $3E, $05, $22, $3E, $07, $22, $3E, $0F
    db   $22, $36, $00, $C9, $F0, $EC, $FE, $50
    db   $D2, $E5, $48, $21, $10, $C2, $09, $36
    db   $3E, $FA, $14, $D2, $A7, $28, $04, $3D
    db   $EA, $14, $D2, $FA, $18, $D2, $A7, $28
    db   $04, $3D, $EA, $18, $D2, $CD, $4F, $48
    db   $CD, $AF, $7C, $F0, $F0, $C7

    dw JumpTable_4553_18 ; 00

    db   $85, $45, $B3, $45, $C2, $46, $55, $47
    db   $6E, $47

JumpTable_4553_18:
    ld   a, [$DB49]
    and  %00000010
    jr   z, .else_18_4565

    call toc_18_7CF5
    jr   nc, .else_18_457A

    ld   a, $89
    call toc_01_2185
    ret


JumpTable_4553_18.else_18_4565:
    ifLt [hLinkPositionX], 48, .else_18_457A

    assign [hLinkPositionX], $2F
    call toc_01_1495
    ld   a, $85
    call toc_01_2185
    call JumpTable_3B8D_00
JumpTable_4553_18.else_18_457A:
    ld   a, [hFrameCounter]
    rra
    rra
    rra
    and  %00000001
    call toc_01_3B87
    ret


    db   $FA, $9F, $C1, $A7, $20, $1F, $FA, $77
    db   $C1, $A7, $20, $10, $1E, $0B, $21, $00
    db   $DB, $2A, $FE, $09, $28, $10, $1D, $7B
    db   $FE, $FF, $20, $F5, $CD, $8D, $3B, $70
    db   $3E, $8A, $CD, $85, $21, $C9, $CD, $8D
    db   $3B, $3E, $87, $C3, $85, $21, $FA, $9F
    db   $C1, $A7, $20, $1E, $3E, $30, $EA, $68
    db   $D3, $CD, $8D, $3B, $AF, $EA, $10, $D2
    db   $EA, $11, $D2, $EA, $12, $D2, $EA, $13
    db   $D2, $EA, $17, $D2, $EA, $14, $D2, $EA
    db   $18, $D2, $C9, $00, $00, $00, $00, $00
    db   $00, $00, $00, $00, $00, $00, $00, $00
    db   $00, $00, $00, $00, $00, $00, $00, $00
    db   $00, $00, $00, $01, $02, $03, $04, $00
    db   $00, $00, $00, $00, $00, $00, $00, $00
    db   $00, $00, $00, $01, $02, $03, $04, $00
    db   $00, $00, $00, $00, $00, $00, $00, $00
    db   $00, $00, $00, $01, $02, $03, $04, $00
    db   $00, $00, $00, $00, $00, $00, $00, $01
    db   $02, $03, $04, $00, $00, $00, $00, $00
    db   $00, $02, $01, $02, $01, $02, $01, $02
    db   $01, $00, $00, $00, $00, $00, $01, $00
    db   $01, $00, $01, $00, $01, $00, $01, $00
    db   $01, $00, $01, $00, $01, $02, $01, $02
    db   $01, $02, $01, $02, $01, $02, $01, $02
    db   $01, $02, $01, $02, $01, $02, $01, $02
    db   $01, $02, $01, $02, $01, $02, $01, $02
    db   $01, $02, $01, $02, $01, $02, $01, $02
    db   $01, $02, $01, $02, $01, $02, $01, $02
    db   $02, $02, $02, $02, $02, $02, $02, $04
    db   $04, $04, $04, $04, $04, $04, $04, $04
    db   $04, $04, $04, $02, $03, $02, $03, $02
    db   $03, $02, $03, $02, $03, $02, $02, $03
    db   $04, $05, $06, $05, $06, $05, $06, $05
    db   $06, $05, $06, $05, $06, $05, $06, $05
    db   $06, $04, $02, $03, $02, $03, $02, $03
    db   $02, $03, $02, $03, $02, $03, $02, $04
    db   $05, $04, $05, $03, $02, $03, $02, $03
    db   $02, $03, $02, $01, $01, $01, $01, $01
    db   $01, $00, $00, $00, $00, $3E, $02, $E0
    db   $A1, $EA, $67, $C1, $FA, $10, $D2, $C6
    db   $01, $EA, $10, $D2, $FA, $11, $D2, $CE
    db   $00, $EA, $11, $D2, $FA, $11, $D2, $FE
    db   $05, $20, $10, $FA, $10, $D2, $FE, $F0
    db   $20, $09, $CD, $8D, $3B, $CD, $91, $08
    db   $36, $20, $C9, $FA, $12, $D2, $3C, $FE
    db   $14, $20, $08, $FA, $13, $D2, $3C, $EA
    db   $13, $D2, $AF, $EA, $12, $D2, $FA, $13
    db   $D2, $5F, $50, $21, $26, $46, $19, $7E
    db   $CD, $87, $3B, $21, $D8, $45, $19, $7E
    db   $21, $B0, $C2, $09, $77, $21, $74, $46
    db   $19, $7E, $EA, $15, $D2, $FA, $11, $D2
    db   $57, $FA, $10, $D2, $5F, $FE, $CC, $20
    db   $05, $7A, $FE, $00, $28, $10, $7B, $FE
    db   $BE, $20, $05, $7A, $FE, $05, $28, $01
    db   $C9, $3E, $28, $EA, $14, $D2, $CD, $8C
    db   $08, $36, $28, $C9, $00, $00, $40, $00
    db   $00, $08, $42, $00, $00, $10, $44, $00
    db   $CD, $91, $08, $20, $0A, $36, $70, $3E
    db   $10, $EA, $68, $D3, $CD, $8D, $3B, $3E
    db   $02, $E0, $A1, $CD, $7A, $45, $C9, $90
    db   $10, $CD, $7A, $45, $CD, $91, $08, $20
    db   $0F, $3E, $01, $EA, $4A, $DB, $21, $49
    db   $DB, $CB, $CE, $CD, $8D, $3B, $70, $C9
    db   $FE, $08, $20, $06, $35, $3E, $88, $CD
    db   $85, $21, $3E, $6C, $E0, $9D, $3E, $02
    db   $E0, $A1, $F0, $98, $E0, $EE, $F0, $99
    db   $D6, $0C, $E0, $EC, $11, $6C, $47, $AF
    db   $E0, $F1, $CD, $D0, $3C, $C9, $00, $00
    db   $50, $00, $00, $08, $52, $00, $10, $00
    db   $54, $00, $10, $08, $56, $00, $F8, $10
    db   $58, $00, $08, $10, $5A, $00, $18, $10
    db   $5C, $00, $00, $18, $5E, $00, $10, $18
    db   $5E, $40, $00, $00, $50, $00, $00, $08
    db   $52, $00, $10, $00, $4A, $00, $10, $08
    db   $4C, $00, $F8, $10, $58, $00, $08, $10
    db   $4E, $00, $18, $10, $5C, $00, $00, $18
    db   $5E, $00, $10, $18, $5E, $40, $00, $00
    db   $50, $00, $00, $08, $52, $00, $10, $00
    db   $54, $00, $10, $08, $56, $00, $F8, $10
    db   $60, $00, $08, $10, $5A, $00, $18, $10
    db   $62, $00, $00, $18, $5E, $00, $10, $18
    db   $5E, $40, $00, $00, $46, $00, $00, $08
    db   $48, $00, $10, $00, $4A, $00, $10, $08
    db   $4C, $00, $F8, $10, $60, $00, $08, $10
    db   $4E, $00, $18, $10, $62, $00, $00, $18
    db   $5E, $00, $10, $18, $5E, $40, $FF, $FF
    db   $FF, $FF, $64, $00, $66, $00, $64, $40
    db   $66, $40, $66, $60, $64, $60, $66, $20
    db   $64, $20, $21, $B0, $C2, $09, $7E, $E0
    db   $F1, $F0, $EC, $C6, $03, $E0, $EC, $11
    db   $3B, $48, $CD, $3B, $3C, $3E, $02, $CD
    db   $D0, $3D, $CD, $BA, $3D, $CD, $8C, $08
    db   $28, $04, $3E, $03, $18, $05, $21, $B0
    db   $C3, $09, $7E, $17, $17, $E6, $FC, $5F
    db   $17, $17, $17, $E6, $E0, $83, $5F, $50
    db   $21, $AB, $47, $19, $0E, $09, $CD, $26
    db   $3D, $3E, $09, $CD, $D0, $3D, $CD, $8C
    db   $08, $C8, $F0, $EE, $D6, $18, $E0, $EE
    db   $F0, $EC, $D6, $10, $E0, $EC, $21, $49
    db   $47, $0E, $03, $CD, $26, $3D, $3E, $03
    db   $CD, $D0, $3D, $C9, $00, $FC, $76, $00
    db   $00, $04, $78, $00, $00, $0C, $7A, $00
    db   $00, $FC, $7C, $00, $00, $04, $78, $00
    db   $00, $0C, $7E, $00, $68, $00, $6A, $00
    db   $6C, $00, $6E, $00, $70, $00, $70, $20
    db   $6A, $20, $68, $20, $6E, $20, $6C, $20
    db   $72, $00, $74, $00, $74, $20, $72, $20
    db   $CD, $FD, $48, $F0, $E7, $1F, $1F, $1F
    db   $1F, $E6, $01, $CD, $87, $3B, $FA, $15
    db   $D2, $A7, $28, $03, $CD, $87, $3B, $C9
    db   $FA, $14, $D2, $A7, $28, $20, $F0, $EE
    db   $D6, $18, $E0, $EE, $F0, $EC, $D6, $10
    db   $E0, $EC, $21, $49, $47, $0E, $03, $CD
    db   $26, $3D, $3E, $03, $CD, $D0, $3D, $CD
    db   $BA, $3D, $3E, $07, $E0, $F1, $F0, $F1
    db   $FE, $02, $30, $13, $21, $B1, $48, $3D
    db   $20, $03, $21, $BD, $48, $0E, $03, $CD
    db   $26, $3D, $3E, $03, $C3, $D0, $3D, $11
    db   $C1, $48, $CD, $3B, $3C, $3E, $02, $C3
    db   $D0, $3D, $F0, $00, $70, $00, $F0, $08
    db   $72, $00, $00, $00, $74, $00, $00, $08
    db   $76, $00, $21, $47, $49, $0E, $04, $CD
    db   $26, $3D, $F0, $F0, $C7

    dw JumpTable_4968_18 ; 00

    db   $7A, $49, $B2, $49

JumpTable_4968_18:
    ld   a, [$FFF8]
    and  %00100000
    jr   z, .else_18_4976

    ld   hl, $C200
    add  hl, bc
    ld   a, [hl]
    sub  a, $10
    ld   [hl], a
JumpTable_4968_18.else_18_4976:
    call JumpTable_3B8D_00
    ret


    db   $CD, $AF, $7C, $FA, $7F, $DB, $A7, $C0
    db   $CD, $0E, $7D, $30, $2A, $FA, $0E, $DB
    db   $FE, $0D, $20, $1E, $3E, $0E, $EA, $0E
    db   $DB, $3E, $01, $EA, $7F, $DB, $3E, $04
    db   $E0, $F4, $CD, $91, $08, $36, $60, $CD
    db   $2B, $7F, $3E, $16, $CD, $85, $21, $C3
    db   $8D, $3B, $3E, $9C, $CD, $85, $21, $C9
    db   $3E, $02, $E0, $A1, $EA, $67, $C1, $CD
    db   $91, $08, $20, $0E, $CD, $8D, $3B, $36
    db   $01, $3E, $02, $E0, $F2, $AF, $EA, $67
    db   $C1, $C9, $FE, $40, $20, $05, $21, $F4
    db   $FF, $36, $11, $30, $09, $21, $40, $C2
    db   $09, $36, $FC, $CD, $DA, $7D, $C9, $FF
    db   $FF, $FF, $FF, $54, $00, $54, $60, $54
    db   $40, $54, $20, $56, $00, $56, $20, $52
    db   $00, $52, $20, $11, $E1, $49, $CD, $3B
    db   $3C, $CD, $61, $7D, $CD, $83, $7D, $F0
    db   $F0, $C7

    dw JumpTable_4A0C_18 ; 00

    db   $45, $4A, $50, $4A, $77, $4A

JumpTable_4A0C_18:
    ld   hl, $C340
    add  hl, bc
    set  6, [hl]
    call toc_01_27ED
    and  %00000111
    ld   e, a
    ld   d, b
    ld   hl, $635A
    add  hl, de
    ld   a, [hl]
    ld   hl, $C200
    add  hl, bc
    ld   [hl], a
    ld   hl, $6352
    add  hl, de
    ld   a, [hl]
    ld   hl, $C210
    add  hl, bc
    ld   [hl], a
    call toc_18_646E
    ifEq [$FFDA], $07, .else_18_4A37

    ret


JumpTable_4A0C_18.else_18_4A37:
    call toc_01_0891
    call toc_01_27ED
    and  %01111111
    or   $40
    ld   [hl], a
    jp   JumpTable_3B8D_00

    db   $CD, $91, $08, $20, $05, $36, $60, $CD
    db   $8D, $3B, $C9, $CD, $91, $08, $20, $10
    db   $36, $60, $21, $D0, $C3, $09, $70, $21
    db   $40, $C3, $09, $CB, $B6, $C3, $8D, $3B
    db   $E6, $04, $3E, $01, $28, $01, $3C, $C3
    db   $87, $3B, $00, $00, $01, $02, $02, $02
    db   $01, $00, $21, $D0, $C3, $09, $7E, $34
    db   $1F, $1F, $1F, $E6, $07, $5F, $50, $21
    db   $6F, $4A, $19, $7E, $21, $10, $C3, $09
    db   $77, $CD, $B4, $3B, $CD, $91, $08, $20
    db   $1C, $CD, $8D, $3B, $70, $AF, $CD, $87
    db   $3B, $3E, $0E, $E0, $F2, $F0, $EE, $E0
    db   $D7, $F0, $EC, $C6, $00, $E0, $D8, $3E
    db   $01, $CD, $53, $09, $C9, $FE, $30, $20
    db   $23, $3E, $7D, $CD, $01, $3C, $38, $1C
    db   $F0, $D7, $21, $00, $C2, $19, $77, $F0
    db   $D8, $21, $10, $C2, $19, $77, $21, $B0
    db   $C2, $19, $34, $C5, $D5, $C1, $3E, $18
    db   $CD, $25, $3C, $C1, $CD, $91, $08, $1E
    db   $03, $FE, $50, $30, $05, $FE, $20, $38
    db   $01, $1C, $7B, $C3, $87, $3B, $00, $00
    db   $70, $00, $00, $08, $72, $00, $10, $00
    db   $74, $00, $10, $08, $74, $20, $00, $00
    db   $72, $20, $00, $08, $70, $20, $10, $00
    db   $74, $00, $10, $08, $74, $20, $00, $00
    db   $78, $20, $00, $08, $76, $20, $10, $00
    db   $74, $00, $10, $08, $74, $20, $00, $00
    db   $76, $00, $00, $08, $78, $00, $10, $00
    db   $74, $00, $10, $08, $74, $20, $7A, $00
    db   $7C, $00, $7E, $00, $7E, $20, $F0, $F1
    db   $17, $17, $17, $17, $E6, $F0, $5F, $50
    db   $21, $EB, $4A, $19, $0E, $04, $CD, $26
    db   $3D, $3E, $04, $CD, $D0, $3D, $F0, $E7
    db   $1F, $1F, $1F, $1F, $1F, $E6, $01, $CD
    db   $87, $3B, $CD, $30, $7E, $C6, $0C, $FE
    db   $18, $30, $0F, $CD, $20, $7E, $C6, $10
    db   $FE, $20, $30, $06, $7B, $C6, $02, $CD
    db   $87, $3B, $CD, $AF, $7C, $F0, $F6, $FE
    db   $A8, $CA, $F6, $4B, $11, $2B, $4B, $FA
    db   $0E, $DB, $FE, $09, $30, $03, $11, $2F
    db   $4B, $AF, $E0, $F1, $F0, $EE, $C6, $18
    db   $E0, $EE, $F0, $EC, $C6, $08, $E0, $EC
    db   $CD, $3B, $3C, $CD, $BA, $3D, $CD, $61
    db   $7D, $F0, $F0, $C7

    dw JumpTable_4BA7_18 ; 00

    db   $C5, $4B, $DF, $4B

JumpTable_4BA7_18:
    call toc_18_7D02
    jr   nc, .return_18_4BC4

    ifNe [$DB0E], $08, .else_18_4BBB

    ld   a, $67
    call toc_01_2185
    jp   JumpTable_3B8D_00

JumpTable_4BA7_18.else_18_4BBB:
    ld   a, $66
    jr   c, .else_18_4BC1

    ld   a, $6B
JumpTable_4BA7_18.else_18_4BC1:
    call toc_01_2185
JumpTable_4BA7_18.return_18_4BC4:
    ret


    db   $FA, $9F, $C1, $A7, $20, $0E, $CD, $8D
    db   $3B, $FA, $77, $C1, $A7, $20, $05, $3E
    db   $68, $C3, $85, $21, $70, $3E, $69, $C3
    db   $85, $21, $FA, $9F, $C1, $A7, $20, $10
    db   $CD, $8D, $3B, $70, $CD, $98, $08, $3E
    db   $09, $EA, $0E, $DB, $3E, $0D, $E0, $A5
    db   $C9, $CD, $61, $7D, $F0, $F0, $C7

    dw JumpTable_4C08_18 ; 00

    db   $26, $4C, $31, $4C, $44, $4C, $5A, $4C
    db   $7D, $4C

JumpTable_4C08_18:
    call toc_18_7D02
    jr   nc, .return_18_4C25

    ifNe [$DB0E], $09, .else_18_4C1C

    ld   a, $34
    call toc_01_2185
    jp   JumpTable_3B8D_00

JumpTable_4C08_18.else_18_4C1C:
    ld   a, $33
    jr   c, .else_18_4C22

    ld   a, $39
JumpTable_4C08_18.else_18_4C22:
    call toc_01_2185
JumpTable_4C08_18.return_18_4C25:
    ret


    db   $FA, $9F, $C1, $A7, $20, $04, $CD, $8D
    db   $3B, $C9, $C9, $CD, $8D, $3B, $3E, $08
    db   $EA, $95, $DB, $AF, $EA, $6B, $C1, $EA
    db   $6C, $C1, $EA, $96, $DB, $C9, $FA, $6B
    db   $C1, $FE, $04, $20, $0E, $FA, $9F, $C1
    db   $A7, $20, $08, $CD, $8D, $3B, $3E, $35
    db   $CD, $85, $21, $C9, $FA, $9F, $C1, $A7
    db   $20, $1C, $CD, $8D, $3B, $FA, $77, $C1
    db   $A7, $20, $0D, $CD, $98, $08, $3E, $0A
    db   $EA, $0E, $DB, $3E, $0D, $E0, $A5, $C9
    db   $35, $3E, $37, $CD, $85, $21, $C9, $CD
    db   $02, $7D, $30, $05, $3E, $38, $CD, $85
    db   $21, $C9, $62, $20, $60, $20, $66, $20
    db   $64, $20, $6C, $00, $6E, $00, $68, $00
    db   $6A, $00, $6A, $20, $68, $20, $6C, $00
    db   $6E, $00, $9A, $10, $9C, $10, $21, $40
    db   $C4, $09, $7E, $A7, $20, $12, $34, $FA
    db   $69, $DB, $16, $B1, $E6, $02, $28, $02
    db   $16, $CD, $F0, $F6, $BA, $C2, $76, $7E
    db   $11, $88, $4C, $AF, $E0, $E8, $FA, $0E
    db   $DB, $FE, $0B, $30, $15, $FA, $69, $DB
    db   $E6, $02, $20, $07, $FA, $0E, $DB, $FE
    db   $0A, $38, $07, $3E, $01, $E0, $E8, $11
    db   $94, $4C, $CD, $3B, $3C, $CD, $61, $7D
    db   $F0, $E7, $1F, $1F, $1F, $1F, $E6, $01
    db   $CD, $87, $3B, $CD, $AF, $7C, $F0, $F0
    db   $C7

    dw JumpTable_4CFF_18 ; 00

    db   $35, $4D, $55, $4D, $8F, $4D

JumpTable_4CFF_18:
    call toc_18_7D0E
    jr   nc, .return_18_4D34

    ld   a, [$DB56]
    cp   $80
    ld   a, $78
    jr   z, .else_18_4D1D

    ld   a, [$FFE8]
    and  a
    jr   nz, .else_18_4D20

    ld   a, [$DB0E]
    cp   $0B
    ld   a, $5A
    jr   c, .else_18_4D1D

    ld   a, $5F
JumpTable_4CFF_18.else_18_4D1D:
    jp   toc_01_2185

JumpTable_4CFF_18.else_18_4D20:
    ifNe [$DB0E], $0A, .else_18_4D2F

    ld   a, $5C
    call toc_01_2185
    jp   JumpTable_3B8D_00

JumpTable_4CFF_18.else_18_4D2F:
    ld   a, $5B
    call toc_01_2185
JumpTable_4CFF_18.return_18_4D34:
    ret


    db   $FA, $77, $C1, $A7, $20, $10, $3E, $01
    db   $E0, $F2, $EA, $7F, $DB, $CD, $91, $08
    db   $36, $80, $CD, $8D, $3B, $C9, $3E, $59
    db   $CD, $85, $21, $CD, $8D, $3B, $70, $C9
    db   $CD, $91, $08, $20, $11, $3E, $0B, $EA
    db   $0E, $DB, $3E, $0D, $E0, $A5, $3E, $5D
    db   $CD, $85, $21, $C3, $8D, $3B, $3E, $02
    db   $E0, $A1, $EA, $67, $C1, $AF, $E0, $F1
    db   $F0, $EC, $D6, $0E, $E0, $EC, $F0, $EE
    db   $D6, $04, $E0, $EE, $11, $A0, $4C, $CD
    db   $3B, $3C, $CD, $BA, $3D, $3E, $02, $C3
    db   $87, $3B, $FA, $9F, $C1, $A7, $20, $0D
    db   $EA, $7F, $DB, $EA, $67, $C1, $CD, $98
    db   $08, $CD, $8D, $3B, $70, $C9, $00, $F8
    db   $60, $00, $00, $00, $62, $00, $00, $08
    db   $64, $00, $00, $F8, $66, $00, $00, $00
    db   $68, $00, $00, $08, $6A, $00, $02, $00
    db   $06, $04, $F0, $F1, $CB, $27, $CB, $27
    db   $5F, $CB, $27, $83, $5F, $50, $21, $A3
    db   $4D, $19, $0E, $03, $CD, $26, $3D, $F0
    db   $E7, $1F, $1F, $1F, $1F, $E6, $01, $CD
    db   $87, $3B, $CD, $61, $7D, $CD, $AF, $7C
    db   $F0, $F0, $C7

    dw JumpTable_4DEE_18 ; 00

    db   $0B, $4E, $32, $4E

JumpTable_4DEE_18:
    call toc_18_7D0E
    jr   nc, .return_18_4E0A

    ld   a, [$DB0E]
    and  a
    ld   e, $2A
    jr   z, .else_18_4E06

    ld   e, $2C
    cp   $01
    jr   nz, .else_18_4E06

    call JumpTable_3B8D_00
    ld   e, $2B
JumpTable_4DEE_18.else_18_4E06:
    ld   a, e
    call toc_01_2185
JumpTable_4DEE_18.return_18_4E0A:
    ret


    db   $FA, $9F, $C1, $A7, $20, $20, $FA, $77
    db   $C1, $A7, $20, $11, $3E, $02, $EA, $0E
    db   $DB, $3E, $0D, $E0, $A5, $3E, $28, $CD
    db   $85, $21, $C3, $8D, $3B, $3E, $27, $CD
    db   $85, $21, $CD, $8D, $3B, $70, $C9, $FA
    db   $9F, $C1, $A7, $20, $07, $CD, $98, $08
    db   $CD, $8D, $3B, $70, $C9, $21, $D0, $C2
    db   $09, $7E, $A7, $C2, $50, $50, $F0, $F8
    db   $E6, $20, $C2, $76, $7E, $CD, $E2, $08
    db   $F0, $F0, $C7

    dw JumpTable_4E68_18 ; 00

    db   $81, $4E, $9B, $4E, $C1, $4E, $E8, $4E
    db   $FF, $4E, $32, $4F, $6F, $4F, $BD, $4F

JumpTable_4E68_18:
    ld   a, [$DB76]
    ld   hl, $4EF9
    cp   [hl]
    jr   nz, .return_18_4E80

    inc  hl
    ld   a, [$DB77]
    cp   [hl]
    jr   nz, .return_18_4E80

    inc  hl
    ld   a, [$DB78]
    cp   [hl]
    jp   z, toc_18_7E76

JumpTable_4E68_18.return_18_4E80:
    ret


    db   $CD, $91, $08, $36, $90, $F0, $EE, $E0
    db   $D7, $F0, $EC, $E0, $D8, $3E, $02, $CD
    db   $53, $09, $3E, $06, $E0, $F2, $CD, $8D
    db   $3B, $C9, $CD, $31, $50, $CD, $91, $08
    db   $20, $05, $36, $60, $C3, $8D, $3B, $1E
    db   $FC, $D6, $08, $E6, $10, $28, $02, $1E
    db   $04, $21, $40, $C2, $09, $73, $21, $50
    db   $C2, $09, $36, $FC, $CD, $CD, $7D, $C9
    db   $CD, $31, $50, $CD, $91, $08, $20, $1E
    db   $36, $48, $3E, $02, $CD, $01, $3C, $F0
    db   $D7, $21, $00, $C2, $19, $77, $F0, $D8
    db   $21, $10, $C2, $19, $77, $21, $E0, $C2
    db   $19, $36, $20, $CD, $8D, $3B, $C9, $CD
    db   $16, $50, $CD, $91, $08, $20, $08, $3E
    db   $E1, $CD, $EE, $4F, $CD, $8D, $3B, $C9
    db   $40, $60, $60, $E2, $E3, $E4, $CD, $16
    db   $50, $FA, $9F, $C1, $A7, $20, $29, $21
    db   $B0, $C2, $09, $5E, $16, $00, $7B, $EA
    db   $01, $D2, $3C, $FE, $03, $20, $01, $AF
    db   $77, $21, $F9, $4E, $19, $7E, $21, $76
    db   $DB, $19, $BE, $28, $E2, $21, $FC, $4E
    db   $19, $7E, $CD, $EE, $4F, $CD, $8D, $3B
    db   $C9, $CD, $16, $50, $FA, $9F, $C1, $A7
    db   $C0, $CD, $8D, $3B, $FA, $77, $C1, $A7
    db   $20, $29, $3E, $CA, $CD, $01, $3C, $3E
    db   $26, $E0, $F4, $F0, $D7, $21, $00, $C2
    db   $19, $77, $F0, $D8, $21, $10, $C2, $19
    db   $77, $21, $D0, $C2, $19, $36, $01, $21
    db   $E0, $C2, $19, $36, $C0, $CD, $91, $08
    db   $36, $C0, $C9, $35, $35, $C9, $21, $FE
    db   $4F, $0E, $03, $CD, $26, $3D, $CD, $40
    db   $50, $CD, $91, $08, $C0, $CD, $AF, $3D
    db   $3E, $E5, $CD, $EE, $4F, $CD, $8D, $3B
    db   $FA, $01, $D2, $5F, $50, $21, $F9, $4E
    db   $19, $7E, $21, $76, $DB, $19, $77, $57
    db   $7B, $A7, $20, $12, $21, $4C, $DB, $72
    db   $16, $0C, $CD, $95, $3E, $AF, $EA, $4B
    db   $DB, $3E, $0B, $E0, $A5, $C9, $FE, $01
    db   $20, $05, $21, $4D, $DB, $72, $C9, $21
    db   $45, $DB, $72, $C9, $CD, $16, $50, $FA
    db   $9F, $C1, $A7, $20, $27, $21, $40, $C4
    db   $09, $7E, $A7, $20, $05, $34, $3E, $3B
    db   $E0, $F2, $CD, $D0, $7D, $21, $50, $C2
    db   $09, $35, $35, $35, $F0, $EC, $FE, $F0
    db   $38, $0A, $CD, $2B, $7F, $AF, $EA, $67
    db   $C1, $CD, $76, $7E, $C9, $5F, $F0, $99
    db   $F5, $3E, $20, $E0, $99, $7B, $CD, $97
    db   $21, $F1, $E0, $99, $C9, $00, $FC, $70
    db   $00, $00, $04, $72, $00, $00, $0C, $70
    db   $20, $00, $FC, $74, $00, $00, $04, $76
    db   $00, $00, $0C, $74, $20, $21, $FE, $4F
    db   $F0, $E7, $E6, $08, $28, $03, $21, $0A
    db   $50, $0E, $03, $CD, $26, $3D, $18, $17
    db   $7E, $00, $7E, $20, $7E, $40, $7E, $60
    db   $F0, $E7, $1F, $1F, $1F, $E6, $01, $E0
    db   $F1, $11, $29, $50, $CD, $3B, $3C, $3E
    db   $02, $E0, $A1, $EA, $67, $C1, $3E, $04
    db   $E0, $9D, $AF, $EA, $9B, $C1, $C9, $CD
    db   $C9, $50, $CD, $91, $08, $CA, $76, $7E
    db   $CB, $4F, $3E, $E4, $28, $02, $3E, $44
    db   $EA, $97, $DB, $C9, $10, $00, $7C, $00
    db   $10, $08, $7C, $60, $20, $00, $7C, $00
    db   $20, $08, $7C, $60, $30, $F8, $78, $00
    db   $30, $00, $7A, $00, $30, $08, $7A, $20
    db   $30, $10, $78, $20, $40, $F8, $78, $40
    db   $40, $00, $7A, $40, $40, $08, $7A, $60
    db   $40, $10, $78, $60, $10, $00, $7C, $50
    db   $10, $08, $7C, $30, $20, $00, $7C, $50
    db   $20, $08, $7C, $30, $30, $F8, $78, $10
    db   $30, $00, $7A, $10, $30, $08, $7A, $30
    db   $30, $10, $78, $30, $40, $F8, $78, $50
    db   $40, $00, $7A, $50, $40, $08, $7A, $70
    db   $40, $10, $78, $70, $0C, $0C, $04, $02
    db   $F0, $EC, $D6, $05, $E0, $EC, $CD, $91
    db   $08, $0E, $0C, $FE, $B0, $38, $0D, $D6
    db   $B0, $1F, $1F, $E6, $03, $5F, $50, $21
    db   $C5, $50, $19, $4E, $21, $65, $50, $F0
    db   $E7, $E6, $04, $28, $03, $21, $95, $50
    db   $CD, $26, $3D, $3E, $04, $CD, $D0, $3D
    db   $C9, $0E, $00, $11, $FA, $50, $CD, $D0
    db   $3C, $21, $D0, $C3, $09, $7E, $3D, $77
    db   $CA, $76, $7E, $CB, $67, $1E, $01, $28
    db   $02, $1E, $FF, $CB, $47, $20, $07, $21
    db   $40, $C2, $09, $7E, $83, $77, $C3, $CD
    db   $7D, $50, $00, $52, $00, $52, $20, $50
    db   $20, $54, $00, $56, $00, $56, $20, $54
    db   $20, $CD, $68, $51, $11, $22, $51, $CD
    db   $3B, $3C, $FA, $0F, $C5, $5F, $50, $21
    db   $10, $C2, $19, $F0, $EF, $1E, $00, $BE
    db   $38, $02, $1E, $02, $F0, $E7, $1F, $1F
    db   $1F, $1F, $1F, $E6, $01, $83, $CD, $87
    db   $3B, $CD, $AF, $7C, $CD, $0E, $7D, $30
    db   $05, $3E, $96, $CD, $85, $21, $C9, $FA
    db   $74, $DB, $A7, $CA, $76, $7E, $C0, $74
    db   $00, $76, $00, $70, $00, $72, $00, $76
    db   $20, $74, $20, $72, $20, $70, $20, $CD
    db   $68, $51, $11, $70, $51, $CD, $3B, $3C
    db   $FA, $0F, $C5, $5F, $50, $21, $00, $C2
    db   $19, $F0, $EE, $1E, $00, $BE, $30, $02
    db   $1E, $02, $F0, $E7, $1F, $1F, $1F, $1F
    db   $1F, $E6, $01, $83, $CD, $87, $3B, $18
    db   $B0, $50, $00, $52, $00, $52, $20, $50
    db   $20, $54, $00, $56, $00, $56, $20, $54
    db   $20, $58, $00, $5A, $00, $58, $00, $5A
    db   $00, $5A, $20, $58, $20, $5A, $20, $58
    db   $20, $FA, $74, $DB, $A7, $C2, $76, $7E
    db   $11, $AA, $51, $CD, $3B, $3C, $F0, $E7
    db   $E6, $3F, $20, $08, $CD, $4F, $7E, $21
    db   $80, $C3, $09, $73, $CD, $D9, $7C, $CD
    db   $61, $7D, $CD, $06, $7E, $21, $20, $C3
    db   $09, $35, $35, $21, $10, $C3, $09, $7E
    db   $A7, $28, $04, $E6, $80, $28, $0E, $70
    db   $21, $20, $C3, $09, $70, $F0, $E7, $E6
    db   $1F, $20, $02, $36, $0C, $F0, $EF, $E0
    db   $EC, $CD, $AF, $7C, $CD, $BA, $3D, $CD
    db   $0E, $7D, $D0, $1E, $00, $FA, $A5, $DB
    db   $A7, $20, $0D, $1C, $F0, $F6, $FE, $CC
    db   $28, $06, $1C, $FE, $CD, $28, $01, $1C
    db   $FA, $6A, $DB, $E6, $02, $28, $04, $7B
    db   $C6, $04, $5F, $FA, $73, $DB, $A7, $28
    db   $05, $3E, $52, $C3, $8E, $21, $7B, $C6
    db   $4A, $C3, $8E, $21, $78, $00, $7A, $00
    db   $7C, $00, $7E, $00, $7A, $20, $78, $20
    db   $7E, $20, $7C, $20, $CD, $68, $51, $11
    db   $4D, $52, $CD, $3B, $3C, $FA, $0F, $C5
    db   $5F, $50, $21, $00, $C2, $19, $F0, $EE
    db   $1E, $00, $BE, $30, $02, $1E, $02, $F0
    db   $E7, $1F, $1F, $1F, $1F, $1F, $E6, $01
    db   $83, $CD, $87, $3B, $C3, $5A, $51, $5A
    db   $20, $58, $20, $5E, $20, $5C, $20, $58
    db   $00, $5A, $00, $5C, $00, $5E, $00, $11
    db   $88, $52, $CD, $3B, $3C, $F0, $E7, $1F
    db   $1F, $1F, $E6, $01, $CD, $87, $3B, $3E
    db   $02, $E0, $A1, $EA, $67, $C1, $CD, $06
    db   $7E, $21, $20, $C3, $09, $35, $35, $21
    db   $10, $C3, $09, $7E, $E6, $80, $E0, $E8
    db   $28, $06, $70, $21, $20, $C3, $09, $70
    db   $F0, $F0, $C7

    dw JumpTable_52D4_18 ; 00

    db   $01, $53, $2A, $53, $4F, $53

JumpTable_52D4_18:
    call toc_01_0891
    ret  nz

    ld   hl, $C240
    add  hl, bc
    ld   [hl], $0C
    call toc_18_7DDA
    ifNe [$FFEE], $20, .else_18_52F6

    ld   a, $01
    call toc_18_59B8.toc_18_59BA
    assign [hLinkDirection], $01
    push bc
    call toc_01_087C
    pop  bc
    ret


JumpTable_52D4_18.else_18_52F6:
    cp   $48
    ret  nz

    call toc_01_0891
    ld   [hl], $40
    jp   JumpTable_3B8D_00

    db   $CD, $91, $08, $20, $0D, $3E, $E3, $CD
    db   $85, $21, $CD, $91, $08, $36, $10, $CD
    db   $8D, $3B, $F0, $E8, $A7, $28, $11, $21
    db   $40, $C4, $09, $7E, $35, $A7, $20, $08
    db   $36, $08, $21, $20, $C3, $09, $36, $12
    db   $C9, $CD, $13, $53, $FA, $9F, $C1, $A7
    db   $20, $1B, $CD, $91, $08, $20, $0A, $36
    db   $10, $3E, $E5, $CD, $85, $21, $C3, $8D
    db   $3B, $1E, $02, $FE, $08, $30, $02, $1E
    db   $00, $7B, $CD, $BA, $59, $C9, $CD, $13
    db   $53, $FA, $9F, $C1, $A7, $20, $69, $CD
    db   $91, $08, $28, $0C, $1E, $01, $FE, $08
    db   $38, $02, $1E, $02, $7B, $C3, $BA, $59
    db   $F0, $E7, $1F, $1F, $1F, $E6, $01, $C6
    db   $02, $CD, $87, $3B, $21, $74, $DB, $36
    db   $01, $F0, $EE, $E6, $FC, $FE, $E0, $28
    db   $09, $21, $40, $C2, $09, $36, $EC, $CD
    db   $DA, $7D, $FA, $0F, $C5, $5F, $50, $21
    db   $40, $C2, $19, $36, $F4, $F0, $E7, $1F
    db   $1F, $1F, $E6, $01, $C6, $04, $21, $B0
    db   $C3, $19, $77, $D5, $C5, $D5, $C1, $CD
    db   $DA, $7D, $C1, $D1, $21, $00, $C2, $19
    db   $7E, $FE, $F0, $20, $0B, $CD, $76, $7E
    db   $AF, $EA, $73, $DB, $AF, $EA, $67, $C1
    db   $C9, $CD, $7E, $54, $CD, $61, $7D, $21
    db   $98, $FF, $F0, $EE, $96, $C6, $04, $FE
    db   $08, $30, $0D, $21, $99, $FF, $F0, $EC
    db   $C6, $04, $96, $38, $03, $CD, $B4, $7C
    db   $21, $98, $FF, $F0, $EE, $96, $C6, $06
    db   $FE, $0C, $30, $6D, $21, $99, $FF, $F0
    db   $EC, $96, $C6, $08, $FE, $04, $30, $61
    db   $1E, $20, $FA, $00, $DB, $FE, $03, $28
    db   $09, $1E, $10, $FA, $01, $DB, $FE, $03
    db   $20, $4F, $F0, $CB, $A3, $28, $4A, $3E
    db   $02, $E0, $BA, $3E, $3A, $E0, $9D, $3E
    db   $02, $E0, $9E, $3E, $01, $E0, $A1, $CD
    db   $3B, $09, $F0, $EE, $E0, $98, $F0, $EC
    db   $C6, $08, $E0, $99, $FE, $50, $30, $22
    db   $F0, $CB, $E6, $08, $28, $1C, $21, $D0
    db   $C3, $09, $7E, $34, $E6, $18, $28, $11
    db   $21, $9D, $FF, $34, $21, $50, $C2, $09
    db   $36, $04, $CD, $D0, $7D, $3E, $01, $E0
    db   $BA, $C9, $21, $D0, $C3, $09, $36, $08
    db   $C9, $F0, $EC, $FE, $1B, $38, $0D, $21
    db   $50, $C2, $09, $36, $FD, $CD, $D0, $7D
    db   $3E, $00, $E0, $BA, $C9, $44, $00, $44
    db   $20, $74, $00, $74, $20, $46, $00, $46
    db   $20, $76, $00, $76, $20, $F0, $F7, $FE
    db   $01, $20, $02, $E0, $F1, $11, $6E, $54
    db   $CD, $3B, $3C, $21, $C0, $C2, $09, $7E
    db   $C6, $FC, $FE, $F0, $D0, $E0, $EC, $11
    db   $76, $54, $CD, $3B, $3C, $F0, $EC, $C6
    db   $10, $E0, $EC, $21, $EF, $FF, $BE, $38
    db   $EE, $CD, $BA, $3D, $C9, $24, $00, $3E
    db   $00, $11, $AE, $54, $CD, $D0, $3C, $CD
    db   $61, $7D, $CD, $91, $08, $CA, $76, $7E
    db   $1E, $01, $FE, $40, $38, $0D, $20, $0A
    db   $21, $10, $C2, $09, $7E, $C6, $04, $77
    db   $18, $01, $1D, $7B, $CD, $87, $3B, $CD
    db   $91, $08, $1E, $FE, $E6, $20, $28, $02
    db   $1E, $FC, $21, $50, $C2, $09, $73, $21
    db   $40, $C2, $09, $36, $FF, $F0, $E7, $E6
    db   $03, $C0, $CD, $CD, $7D, $C9, $21, $B0
    db   $C2, $09, $7E, $A7, $C2, $B2, $54, $FA
    db   $FD, $D8, $E6, $20, $C2, $A0, $58, $CD
    db   $70, $58, $CD, $61, $7D, $CD, $06, $7E
    db   $21, $20, $C3, $09, $35, $21, $10, $C3
    db   $09, $7E, $E6, $80, $28, $06, $70, $21
    db   $20, $C3, $09, $70, $CD, $AF, $7C, $F0
    db   $F0, $C7

    dw JumpTable_553D_18 ; 00

    db   $B5, $55, $DA, $55, $73, $56, $E9, $56
    db   $1D, $57, $56, $57, $81, $57, $9F, $57

JumpTable_553D_18:
    ld   hl, $C3D0
    add  hl, bc
    inc  [hl]
    ld   a, $7F
    and  [hl]
    jr   nz, .else_18_5571

    ld   a, $C4
    call toc_01_3C01
    jr   c, .else_18_5571

    ld   a, [$FFD7]
    sub  a, $08
    ld   hl, $C200
    add  hl, de
    ld   [hl], a
    ld   a, [$FFD8]
    add  a, $02
    ld   hl, $C210
    add  hl, de
    ld   [hl], a
    ld   hl, $C2E0
    add  hl, de
    ld   [hl], $60
    ld   hl, $C340
    add  hl, de
    ld   [hl], $C1
    ld   hl, $C2B0
    add  hl, de
    inc  [hl]
JumpTable_553D_18.else_18_5571:
    ld   a, [$DB73]
    and  a
    jr   nz, .else_18_5582

    call toc_18_7CF5
    jr   nc, .return_18_5581

    ld   a, $E0
    call toc_01_2185
JumpTable_553D_18.return_18_5581:
    ret


JumpTable_553D_18.else_18_5582:
    call toc_18_7E20
    add  a, $13
    cp   $26
    ret  nc

    call toc_18_7E30
    add  a, $20
    cp   $40
    ret  nc

    call toc_01_093B
    call toc_01_1495
    ld   a, [$C146]
    and  a
    ret  nz

    ld   a, [$C50F]
    ld   e, a
    ld   d, b
    ld   hl, $C310
    add  hl, de
    ld   a, [hl]
    and  a
    ret  nz

    call JumpTable_3B8D_00
    ld   a, $E1
    call toc_01_2185
    call toc_18_59B8
    ret


    db   $FA, $9F, $C1, $A7, $20, $1E, $CD, $8D
    db   $3B, $FA, $77, $C1, $A7, $20, $0E, $3E
    db   $2F, $EA, $68, $D3, $EA, $C8, $C3, $CD
    db   $87, $08, $36, $50, $C9, $36, $08, $3E
    db   $E4, $CD, $85, $21, $C9, $3E, $01, $EA
    db   $67, $C1, $3E, $02, $E0, $A1, $CD, $87
    db   $08, $20, $06, $36, $C0, $CD, $8D, $3B
    db   $C9, $1E, $00, $FE, $40, $30, $1A, $1E
    db   $02, $FE, $10, $38, $14, $1E, $00, $FE
    db   $3C, $30, $0C, $FE, $20, $28, $0A, $FE
    db   $21, $28, $06, $FE, $22, $28, $02, $1E
    db   $01, $7B, $CD, $87, $3B, $C9, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $01, $02
    db   $01, $02, $01, $01, $02, $02, $3E, $01
    db   $EA, $67, $C1, $3E, $02, $E0, $A1, $CD
    db   $87, $08, $20, $14, $EA, $C8, $C3, $3E
    db   $11, $E0, $F4, $CD, $91, $08, $36, $08
    db   $3E, $02, $CD, $87, $3B, $C3, $8D, $3B
    db   $21, $D0, $C2, $09, $5E, $50, $F0, $E7
    db   $E6, $07, $20, $14, $34, $7E, $FE, $60
    db   $30, $0E, $E6, $0F, $20, $0A, $21, $20
    db   $C3, $09, $36, $10, $3E, $24, $E0, $F2
    db   $21, $13, $56, $19, $7E, $FE, $02, $20
    db   $0D, $F0, $E7, $E6, $3F, $20, $05, $21
    db   $F2, $FF, $36, $27, $3E, $02, $CD, $87
    db   $3B, $21, $10, $C3, $09, $7E, $A7, $28
    db   $12, $1E, $01, $21, $20, $C3, $09, $7E
    db   $D6, $F8, $E6, $80, $20, $01, $1C, $7B
    db   $CD, $87, $3B, $C9, $3E, $02, $E0, $A1
    db   $CD, $91, $08, $20, $2A, $36, $10, $21
    db   $10, $C2, $09, $7E, $C6, $04, $77, $21
    db   $B0, $C3, $09, $7E, $3C, $77, $FE, $04
    db   $20, $15, $21, $10, $C3, $09, $36, $18
    db   $21, $10, $C2, $09, $7E, $C6, $18, $77
    db   $3E, $08, $E0, $F2, $CD, $8D, $3B, $C9
    db   $3E, $02, $E0, $A1, $21, $10, $C3, $09
    db   $7E, $A7, $20, $2C, $CD, $8D, $3B, $CD
    db   $91, $08, $36, $08, $3E, $24, $E0, $F4
    db   $F0, $EE, $E0, $D7, $F0, $EC, $C6, $10
    db   $E0, $D8, $3E, $01, $CD, $53, $09, $F0
    db   $EE, $C6, $10, $E0, $D7, $F0, $EC, $C6
    db   $10, $E0, $D8, $3E, $01, $CD, $53, $09
    db   $C9, $CD, $91, $08, $20, $21, $CD, $8D
    db   $3B, $F0, $B0, $EA, $68, $D3, $3E, $FF
    db   $CD, $87, $3B, $3E, $E2, $CD, $85, $21
    db   $3E, $03, $CD, $BA, $59, $3E, $03, $E0
    db   $9E, $C5, $CD, $7C, $08, $C1, $C9, $3E
    db   $05, $C3, $87, $3B, $3E, $C8, $CD, $01
    db   $3C, $21, $00, $C2, $19, $36, $F8, $21
    db   $E0, $C2, $19, $36, $20, $21, $10, $C2
    db   $19, $36, $48, $CD, $76, $7E, $CD, $2B
    db   $7F, $C9, $C9, $00, $00, $60, $00, $00
    db   $08, $62, $00, $00, $10, $64, $00, $00
    db   $18, $66, $00, $10, $00, $68, $00, $10
    db   $08, $6A, $00, $10, $10, $6C, $00, $10
    db   $18, $6E, $00, $00, $00, $60, $00, $00
    db   $08, $70, $00, $00, $10, $64, $00, $00
    db   $18, $66, $00, $10, $00, $68, $00, $10
    db   $08, $6A, $00, $10, $10, $6C, $00, $10
    db   $18, $6E, $00, $00, $00, $72, $00, $00
    db   $08, $74, $00, $00, $10, $64, $00, $00
    db   $18, $66, $00, $10, $00, $76, $00, $10
    db   $08, $6A, $00, $10, $10, $6C, $00, $10
    db   $18, $6E, $00, $00, $00, $78, $00, $00
    db   $08, $7A, $00, $00, $10, $7C, $00, $00
    db   $18, $7E, $00, $10, $00, $78, $40, $10
    db   $08, $7A, $40, $10, $10, $7C, $40, $10
    db   $18, $7E, $40, $00, $00, $68, $40, $00
    db   $08, $6A, $40, $00, $10, $6C, $40, $00
    db   $18, $6E, $40, $10, $00, $60, $40, $10
    db   $08, $62, $40, $10, $10, $64, $40, $10
    db   $18, $66, $40, $0E, $00, $68, $40, $0E
    db   $08, $6A, $40, $0E, $10, $6C, $40, $0E
    db   $18, $6E, $40, $10, $00, $FF, $40, $10
    db   $08, $FF, $40, $10, $10, $FF, $40, $10
    db   $18, $FF, $40, $17, $03, $26, $00, $17
    db   $09, $26, $00, $17, $0F, $26, $00, $17
    db   $15, $26, $00, $F0, $F1, $17, $17, $17
    db   $17, $17, $E6, $E0, $5F, $50, $21, $A0
    db   $57, $19, $0E, $08, $CD, $26, $3D, $21
    db   $10, $C3, $09, $7E, $A7, $C8, $F0, $EF
    db   $E0, $EC, $21, $60, $58, $0E, $04, $CD
    db   $26, $3D, $3E, $04, $CD, $D0, $3D, $CD
    db   $BA, $3D, $C9, $CD, $77, $59, $FA, $24
    db   $C1, $A7, $C0, $F0, $F0, $C7

    dw JumpTable_58B3_18 ; 00

    db   $C7, $58, $E7, $58, $FC, $58

JumpTable_58B3_18:
    ld   hl, $C210
    add  hl, bc
    ld   [hl], $68
    ld   hl, $C200
    add  hl, bc
    ld   [hl], $80
    call toc_01_0891
    ld   [hl], $20
    jp   JumpTable_3B8D_00

    db   $CD, $91, $08, $20, $1A, $FA, $4A, $DB
    db   $FE, $00, $20, $13, $FA, $66, $C1, $A7
    db   $FE, $40, $20, $0B, $CD, $8D, $3B, $CD
    db   $91, $08, $36, $20, $CD, $31, $57, $C9
    db   $CD, $91, $08, $20, $05, $36, $C8, $C3
    db   $8D, $3B, $FE, $10, $3E, $01, $38, $01
    db   $3C, $CD, $87, $3B, $C9, $CD, $91, $08
    db   $20, $06, $CD, $31, $57, $C3, $76, $7E
    db   $FE, $B0, $20, $00, $CD, $91, $08, $FE
    db   $80, $20, $06, $35, $3E, $E6, $CD, $85
    db   $21, $CD, $91, $08, $16, $00, $FE, $10
    db   $1E, $02, $38, $06, $1D, $FE, $20, $38
    db   $01, $14, $21, $90, $C3, $09, $72, $7B
    db   $CD, $87, $3B, $C9, $FF, $04, $FF, $00
    db   $FF, $0C, $FF, $00, $FF, $04, $FF, $00
    db   $FF, $0C, $FF, $00, $FF, $14, $FF, $00
    db   $FC, $04, $70, $00, $FC, $0C, $72, $00
    db   $0C, $04, $74, $00, $0C, $0C, $76, $00
    db   $0C, $14, $78, $00, $0C, $04, $7A, $00
    db   $0C, $0C, $7C, $00, $0C, $14, $7E, $00
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $00, $00, $01, $02, $03, $03, $02, $01
    db   $F0, $E7, $1F, $1F, $1F, $1F, $00, $00
    db   $E6, $07, $5F, $50, $21, $6F, $59, $19
    db   $F0, $EC, $86, $E0, $EC, $21, $90, $C3
    db   $09, $7E, $A7, $28, $0D, $F0, $E7, $1F
    db   $1F, $1F, $1F, $1F, $1F, $E6, $01, $3C
    db   $E0, $F1, $F0, $F1, $17, $17, $E6, $FC
    db   $5F, $17, $17, $E6, $F0, $83, $5F, $50
    db   $21, $33, $59, $19, $0E, $05, $C3, $26
    db   $3D

toc_18_59B8:
    ld   a, $00
toc_18_59B8.toc_18_59BA:
    ld   e, $10
    ld   hl, $D1B5
toc_18_59B8.loop_18_59BF:
    ldi  [hl], a
    dec  e
    jr   nz, .loop_18_59BF

    ret


    db   $42, $20, $40, $20, $40, $00, $42, $00
    db   $44, $00, $46, $00, $46, $20, $44, $20
    db   $48, $00, $4A, $00, $4C, $00, $4E, $00
    db   $4A, $20, $48, $20, $4E, $20, $4C, $20
    db   $50, $00, $52, $00, $54, $00, $54, $20
    db   $52, $20, $50, $20, $06, $04, $02, $00
    db   $79, $EA, $0F, $C5, $CD, $91, $08, $28
    db   $4E, $FE, $10, $20, $12, $35, $F0, $99
    db   $F5, $3E, $28, $E0, $99, $3E, $1F, $CD
    db   $97, $21, $F1, $E0, $99, $3E, $0F, $FE
    db   $01, $20, $0D, $AF, $EA, $67, $C1, $3E
    db   $31, $EA, $68, $D3, $3E, $05, $E0, $B0
    db   $AF, $EA, $B0, $C3, $11, $C4, $59, $CD
    db   $3B, $3C, $3E, $6C, $E0, $9D, $3E, $02
    db   $E0, $A1, $3E, $03, $E0, $9E, $F0, $98
    db   $21, $00, $C2, $09, $77, $F0, $99, $D6
    db   $10, $21, $10, $C2, $09, $77, $C9, $21
    db   $40, $C4, $09, $7E, $A7, $20, $45, $FA
    db   $6B, $C1, $FE, $04, $20, $31, $34, $CD
    db   $91, $08, $36, $70, $3E, $10, $EA, $68
    db   $D3, $3E, $FF, $E0, $BF, $F0, $98, $21
    db   $55, $D1, $CD, $85, $5A, $F0, $99, $21
    db   $75, $D1, $CD, $85, $5A, $AF, $21, $95
    db   $D1, $CD, $85, $5A, $F0, $9E, $21, $B5
    db   $D1, $1E, $10, $22, $1D, $20, $FC, $C9
    db   $08, $08, $08, $09, $0A, $0A, $0A, $09
    db   $08, $F8, $06, $01, $FA, $C8, $C3, $A7
    db   $28, $55, $F0, $E7, $1F, $1F, $1F, $1F
    db   $E6, $07, $5F, $50, $21, $8C, $5A, $19
    db   $7E, $E0, $F1, $F0, $E7, $E6, $1F, $20
    db   $3E, $3E, $C9, $CD, $01, $3C, $38, $37
    db   $F0, $D8, $21, $10, $C2, $19, $D6, $08
    db   $77, $C5, $F0, $E7, $1F, $1F, $1F, $1F
    db   $1F, $E6, $01, $4F, $21, $94, $5A, $09
    db   $F0, $D7, $86, $21, $00, $C2, $19, $77
    db   $21, $96, $5A, $09, $7E, $21, $40, $C2
    db   $19, $77, $21, $50, $C2, $19, $36, $FC
    db   $21, $D0, $C3, $19, $36, $40, $C1, $11
    db   $C4, $59, $CD, $3B, $3C, $FA, $4F, $C1
    db   $A7, $C0, $21, $80, $C4, $09, $7E, $A7
    db   $28, $09, $3D, $20, $06, $35, $3E, $7A
    db   $CD, $8E, $21, $21, $00, $C3, $09, $7E
    db   $A7, $28, $53, $FE, $30, $20, $3A, $AF
    db   $EA, $67, $C1, $F0, $98, $D6, $58, $C6
    db   $03, $FE, $06, $30, $0A, $F0, $99, $D6
    db   $50, $C6, $03, $FE, $06, $38, $08, $70
    db   $21, $80, $C4, $09, $36, $1C, $C9, $21
    db   $F2, $FF, $36, $0B, $21, $F3, $FF, $36
    db   $03, $21, $57, $C1, $36, $18, $21, $58
    db   $C1, $36, $04, $21, $98, $FF, $34, $18
    db   $0C, $30, $13, $FE, $10, $20, $06, $35
    db   $3E, $7B, $CD, $8E, $21, $3E, $02, $E0
    db   $A1, $3E, $6A, $E0, $9D, $C9, $FA, $74
    db   $DB, $21, $BC, $C1, $B6, $C0, $FA, $10
    db   $DB, $A7, $CA, $70, $5C, $CD, $9E, $3B
    db   $3E, $02, $E0, $A1, $EA, $67, $C1, $CD
    db   $61, $7D, $FA, $68, $D4, $A7, $28, $04
    db   $3D, $EA, $68, $D4, $F0, $F0, $C7

    dw JumpTable_5B9D_18 ; 00

    db   $B4, $5B, $D2, $5B, $0B, $5C, $3F, $5C

JumpTable_5B9D_18:
    ld   a, [$C11C]
    cp   $03
    ret  z

    assign [$D468], $40
    assign [$FFA5], $0F
    ld   a, $01
    call toc_01_3B87
    jp   JumpTable_3B8D_00

    db   $FA, $68, $D4, $A7, $20, $17, $3E, $18
    db   $EA, $68, $D4, $21, $80, $C3, $09, $36
    db   $01, $3E, $04, $CD, $87, $3B, $3E, $10
    db   $E0, $A5, $CD, $8D, $3B, $C9, $FA, $68
    db   $D4, $A7, $20, $32, $21, $40, $C2, $09
    db   $36, $F4, $CD, $DA, $7D, $F0, $E7, $E6
    db   $08, $1E, $04, $28, $01, $1C, $7B, $CD
    db   $87, $3B, $CD, $20, $7E, $C6, $02, $FE
    db   $04, $D0, $21, $B0, $C3, $09, $36, $02
    db   $21, $80, $C3, $09, $36, $02, $3E, $10
    db   $EA, $68, $D4, $CD, $8D, $3B, $C9, $FA
    db   $68, $D4, $A7, $20, $2D, $FA, $10, $DB
    db   $3D, $5F, $FA, $63, $C1, $BB, $28, $10
    db   $A7, $28, $0D, $1E, $1C, $CD, $ED, $27
    db   $E6, $3F, $20, $0F, $1E, $1E, $18, $0B
    db   $1E, $1B, $FA, $47, $DB, $FE, $80, $30
    db   $02, $1E, $1D, $7B, $CD, $8E, $21, $CD
    db   $8D, $3B, $C9, $AF, $EA, $10, $DB, $EA
    db   $67, $C1, $CD, $8D, $3B, $70, $21, $D0
    db   $C3, $09, $36, $FF, $F0, $EE, $21, $55
    db   $D1, $CD, $69, $5C, $21, $75, $D1, $F0
    db   $EC, $1E, $10, $22, $3D, $1D, $20, $FB
    db   $3E, $02, $21, $B5, $D1, $1E, $10, $22
    db   $1D, $20, $FC, $C9, $FA, $6B, $C1, $FE
    db   $04, $C0, $F0, $F6, $21, $E0, $C3, $09
    db   $77, $21, $20, $C2, $09, $70, $21, $30
    db   $C2, $09, $70, $21, $80, $C3, $09, $5E
    db   $50, $21, $F0, $59, $19, $E5, $FA, $20
    db   $C1, $1F, $1F, $1F, $E1, $E6, $01, $B6
    db   $CD, $87, $3B, $21, $D0, $C3, $09, $7E
    db   $E0, $E8, $E6, $0F, $5F, $50, $21, $55
    db   $D1, $19, $F0, $9F, $77, $F0, $A0, $21
    db   $3B, $C1, $86, $21, $75, $D1, $19, $77
    db   $21, $B5, $D1, $19, $F0, $9E, $77, $21
    db   $B0, $C2, $09, $7E, $E0, $E9, $E6, $0F
    db   $5F, $50, $21, $95, $D1, $19, $F0, $A2
    db   $77, $FA, $1C, $C1, $FE, $02, $28, $14
    db   $FA, $24, $C1, $A7, $20, $0E, $FA, $9F
    db   $C1, $A7, $20, $0D, $21, $9A, $FF, $F0
    db   $9B, $B6, $28, $05, $21, $D0, $C3, $09
    db   $34, $21, $B0, $C2, $09, $34, $F0, $E8
    db   $3C, $E6, $0F, $5F, $50, $21, $55, $D1
    db   $19, $7E, $21, $00, $C2, $09, $77, $21
    db   $75, $D1, $19, $7E, $21, $10, $C2, $09
    db   $77, $21, $B5, $D1, $19, $7E, $21, $80
    db   $C3, $09, $77, $F0, $E9, $3C, $E6, $0F
    db   $5F, $50, $21, $10, $C3, $09, $7E, $F5
    db   $21, $95, $D1, $19, $5E, $21, $10, $C3
    db   $09, $73, $CD, $8C, $08, $21, $24, $C1
    db   $B6, $20, $44, $F1, $BB, $28, $3D, $A7
    db   $28, $2F, $7B, $A7, $20, $36, $CD, $9E
    db   $3B, $21, $80, $C2, $09, $7E, $FE, $02
    db   $C8, $21, $70, $C4, $09, $7E, $3D, $FE
    db   $02, $38, $05, $3E, $07, $E0, $F4, $C9
    db   $F0, $EC, $E0, $D8, $F0, $EE, $E0, $D7
    db   $3E, $0E, $E0, $F2, $3E, $0C, $C3, $53
    db   $09, $7B, $FE, $08, $3E, $08, $30, $02
    db   $3E, $24, $E0, $F2, $C3, $9E, $3B, $F1
    db   $C9, $00, $01, $FF, $00, $10, $F0, $CD
    db   $61, $7D, $3E, $01, $E0, $A4, $3C, $E0
    db   $A1, $EA, $67, $C1, $F0, $CC, $E6, $03
    db   $5F, $50, $21, $85, $5D, $19, $FA, $09
    db   $C1, $F5, $86, $E6, $0F, $5F, $F1, $E6
    db   $F0, $B3, $EA, $09, $C1, $F0, $CC, $1F
    db   $1F, $E6, $03, $5F, $50, $21, $88, $5D
    db   $19, $FA, $09, $C1, $86, $EA, $09, $C1
    db   $FA, $9F, $C1, $A7, $20, $18, $F0, $CC
    db   $E6, $10, $28, $06, $FA, $09, $C1, $C3
    db   $97, $21, $F0, $CC, $E6, $20, $28, $06
    db   $FA, $09, $C1, $C3, $85, $21, $F0, $CC
    db   $E6, $40, $28, $06, $FA, $09, $C1, $C3
    db   $8E, $21, $C9, $CD, $61, $7D, $F0, $E7
    db   $E6, $03, $20, $04, $21, $BF, $C1, $34
    db   $C9, $5E, $00, $5E, $20, $00, $F8, $50
    db   $00, $00, $00, $52, $00, $00, $08, $54
    db   $00, $00, $10, $56, $00, $21, $01, $5E
    db   $0E, $04, $CD, $26, $3D, $3E, $02, $CD
    db   $D0, $3D, $F0, $F0, $C7

    dw JumpTable_5E27_18 ; 00

    db   $30, $5E, $4B, $5E

JumpTable_5E27_18:
    ld   hl, $C200
    add  hl, bc
    ld   [hl], $50
    jp   JumpTable_3B8D_00

    db   $CD, $61, $7D, $CD, $91, $08, $C0, $CD
    db   $0E, $7D, $D0, $FA, $97, $DB, $FE, $E4
    db   $20, $03, $C3, $8D, $3B, $3E, $E6, $CD
    db   $97, $21, $C9, $CD, $61, $7D, $FA, $9F
    db   $C1, $A7, $20, $13, $3E, $0A, $CD, $36
    db   $4C, $CD, $91, $08, $36, $20, $CD, $8D
    db   $3B, $70, $21, $AC, $D8, $CB, $E6, $C9
    db   $F0, $F7, $FE, $16, $CA, $11, $5E, $F0
    db   $EC, $C6, $01, $E0, $EC, $11, $FD, $5D
    db   $CD, $3B, $3C, $CD, $AF, $7C, $CD, $61
    db   $7D, $CD, $0E, $7D, $30, $0F, $FA, $CE
    db   $DB, $A7, $3E, $10, $28, $04, $F0, $F7
    db   $C6, $08, $CD, $85, $21, $C9, $60, $00
    db   $62, $00, $62, $20, $60, $20, $64, $00
    db   $66, $00, $66, $20, $64, $20, $68, $00
    db   $6A, $00, $6C, $00, $6E, $00, $6A, $20
    db   $68, $20, $6E, $20, $6C, $20, $FA, $6B
    db   $DB, $E6, $02, $CA, $76, $7E, $FA, $7B
    db   $DB, $A7, $C2, $76, $7E, $F0, $F8, $E6
    db   $10, $C2, $76, $7E, $21, $C0, $C2, $09
    db   $7E, $A7, $C2, $DD, $60, $79, $EA, $0F
    db   $C5, $11, $96, $5E, $CD, $3B, $3C, $CD
    db   $D9, $7C, $CD, $06, $7E, $21, $20, $C3
    db   $09, $35, $35, $21, $10, $C3, $09, $7E
    db   $A7, $E0, $E8, $28, $04, $E6, $80, $28
    db   $06, $70, $21, $20, $C3, $09, $70, $F0
    db   $F0, $C7

    dw JumpTable_5F22_18 ; 00

    db   $54, $5F, $62, $5F, $7C, $5F, $AD, $5F
    db   $D1, $5F, $E3, $5F, $FA, $5F, $12, $60
    db   $35, $60, $3D, $60, $59, $60, $7B, $60
    db   $21, $D0, $C3, $09, $70, $C9

JumpTable_5F22_18:
    call toc_18_5F3F
    call toc_18_7D61
    call toc_18_7E20
    ld   hl, $C380
    add  hl, bc
    ld   [hl], e
    ifGte [hLinkPositionX], 144, .return_18_5F3E

    ld   a, $35
    call toc_01_218E
    call JumpTable_3B8D_00
JumpTable_5F22_18.return_18_5F3E:
    ret


toc_18_5F3F:
    ifNot [$FFE8], .else_18_5F47

    and  %10000000
    ret  z

toc_18_5F3F.else_18_5F47:
    ld   a, [hFrameCounter]
    and  %00111111
    jr   nz, .return_18_5F53

    ld   hl, $C320
    add  hl, bc
    ld   [hl], $10
toc_18_5F3F.return_18_5F53:
    ret


    db   $CD, $3F, $5F, $CD, $61, $7D, $3E, $36
    db   $CD, $8E, $21, $C3, $8D, $3B, $CD, $3F
    db   $5F, $CD, $61, $7D, $CD, $20, $7E, $C6
    db   $08, $FE, $10, $D0, $CD, $30, $7E, $C6
    db   $10, $FE, $20, $D0, $CD, $8D, $3B, $C9
    db   $CD, $1C, $5F, $CD, $61, $7D, $CD, $20
    db   $7E, $21, $80, $C3, $09, $73, $FA, $A4
    db   $C1, $A7, $28, $11, $F0, $98, $21, $00
    db   $C2, $09, $C6, $10, $77, $F0, $99, $21
    db   $10, $C2, $09, $77, $C9, $AF, $EA, $9B
    db   $C1, $CD, $91, $08, $36, $10, $C3, $8D
    db   $3B, $CD, $1C, $5F, $CD, $61, $7D, $3E
    db   $02, $E0, $A1, $EA, $67, $C1, $3E, $00
    db   $E0, $9E, $C5, $CD, $7C, $08, $C1, $CD
    db   $91, $08, $20, $08, $3E, $37, $CD, $8E
    db   $21, $CD, $8D, $3B, $C9, $CD, $1C, $5F
    db   $CD, $61, $7D, $3E, $02, $E0, $A1, $3E
    db   $38, $CD, $8E, $21, $C3, $8D, $3B, $CD
    db   $1C, $5F, $3E, $02, $E0, $A1, $CD, $61
    db   $7D, $3E, $39, $CD, $8E, $21, $21, $B0
    db   $C2, $09, $70, $C3, $8D, $3B, $CD, $1C
    db   $5F, $3E, $02, $E0, $A1, $CD, $61, $7D
    db   $21, $B0, $C2, $09, $34, $7E, $FE, $A0
    db   $20, $03, $C3, $8D, $3B, $C9, $CD, $1C
    db   $5F, $3E, $02, $E0, $A1, $CD, $61, $7D
    db   $3E, $C2, $CD, $01, $3C, $21, $00, $C2
    db   $19, $36, $12, $21, $10, $C2, $19, $36
    db   $88, $21, $C0, $C2, $19, $34, $C3, $8D
    db   $3B, $CD, $1C, $5F, $3E, $02, $E0, $A1
    db   $C9, $3E, $02, $E0, $A1, $F0, $EC, $FE
    db   $3E, $38, $03, $C3, $8D, $3B, $21, $50
    db   $C2, $09, $36, $06, $21, $80, $C3, $09
    db   $36, $03, $C3, $D0, $7D, $3E, $02, $E0
    db   $A1, $21, $40, $C2, $09, $36, $FA, $21
    db   $80, $C3, $09, $36, $01, $CD, $DA, $7D
    db   $F0, $EE, $FE, $18, $30, $08, $CD, $91
    db   $08, $36, $60, $CD, $8D, $3B, $C9, $3E
    db   $02, $E0, $A1, $CD, $91, $08, $28, $07
    db   $21, $80, $C3, $09, $36, $02, $C9, $21
    db   $40, $C2, $09, $36, $F4, $21, $80, $C3
    db   $09, $36, $01, $CD, $DA, $7D, $F0, $EE
    db   $FE, $F0, $20, $0F, $AF, $EA, $67, $C1
    db   $21, $08, $D8, $CB, $E6, $7E, $E0, $F8
    db   $C3, $76, $7E, $CD, $20, $7E, $7B, $EE
    db   $01, $E0, $9E, $C5, $CD, $7C, $08, $C1
    db   $C9, $50, $00, $52, $00, $52, $20, $50
    db   $20, $54, $00, $56, $00, $56, $20, $54
    db   $20, $58, $00, $5A, $00, $5C, $00, $5E
    db   $00, $5A, $20, $58, $20, $5E, $20, $5C
    db   $20, $11, $BD, $60, $CD, $3B, $3C, $CD
    db   $D9, $7C, $F0, $F0, $C7

    dw JumpTable_60F1_18 ; 00

    db   $23, $61, $39, $61, $5D, $61

JumpTable_60F1_18:
    ld   hl, $C380
    add  hl, bc
    ld   [hl], $02
    ld   hl, $C250
    add  hl, bc
    ld   [hl], $F4
    call toc_18_7DCD.toc_18_7DD0
    ifGte [$FFEC], $70, .return_18_6122

    ld   a, $3B
    call toc_01_218E
    assign [hLinkDirection], $03
    ld   a, [$C50F]
    ld   e, a
    ld   d, b
    ld   hl, $C380
    add  hl, de
    ld   [hl], $03
    push bc
    call toc_01_087C
    pop  bc
    call JumpTable_3B8D_00
JumpTable_60F1_18.return_18_6122:
    ret


    db   $FA, $0F, $C5, $5F, $50, $21, $80, $C3
    db   $19, $36, $03, $CD, $61, $7D, $3E, $3A
    db   $CD, $8E, $21, $C3, $8D, $3B, $FA, $0F
    db   $C5, $5F, $50, $21, $80, $C3, $19, $36
    db   $03, $FA, $70, $C1, $FE, $22, $38, $02
    db   $36, $01, $CD, $61, $7D, $FA, $0F, $C5
    db   $5F, $50, $21, $90, $C2, $19, $34, $C3
    db   $8D, $3B, $21, $80, $C3, $09, $36, $01
    db   $21, $40, $C2, $09, $36, $F8, $CD, $DA
    db   $7D, $F0, $EE, $FE, $E0, $20, $03, $CD
    db   $76, $7E, $C9, $FA, $73, $DB, $A7, $C2
    db   $F4, $59, $FA, $74, $DB, $A7, $C0, $FA
    db   $FD, $D8, $E6, $20, $C2, $76, $7E, $FA
    db   $0E, $DB, $FE, $07, $DA, $76, $7E, $11
    db   $96, $5E, $CD, $3B, $3C, $FA, $24, $C1
    db   $A7, $C0, $CD, $AF, $7C, $F0, $F0, $C7

    dw JumpTable_61B1_18 ; 00

    db   $BE, $61, $DB, $61, $FB, $61, $2E, $62
    db   $3D, $62, $52, $62

JumpTable_61B1_18:
    assign [$D368], $4D
    ld   [hDefaultMusicTrack], a
    ld   [$FFBD], a
    call JumpTable_3B8D_00
    ret


    db   $FA, $9F, $C1, $A7, $20, $16, $CD, $30
    db   $7E, $C6, $14, $FE, $28, $30, $0D, $3E
    db   $01, $EA, $67, $C1, $CD, $91, $08, $36
    db   $18, $CD, $8D, $3B, $C9, $FA, $9F, $C1
    db   $A7, $20, $19, $CD, $91, $08, $20, $08
    db   $3E, $D5, $CD, $85, $21, $CD, $8D, $3B
    db   $1E, $02, $FE, $0C, $38, $02, $1E, $04
    db   $7B, $CD, $87, $3B, $C9, $FA, $9F, $C1
    db   $A7, $20, $2C, $CD, $8D, $3B, $FA, $77
    db   $C1, $A7, $20, $1A, $36, $06, $AF, $EA
    db   $6B, $C1, $EA, $6C, $C1, $EA, $7C, $D4
    db   $EA, $96, $DB, $3E, $09, $EA, $95, $DB
    db   $3E, $4E, $EA, $68, $D3, $C9, $AF, $EA
    db   $67, $C1, $3E, $D6, $CD, $85, $21, $C9
    db   $FA, $9F, $C1, $A7, $20, $08, $CD, $91
    db   $08, $36, $60, $CD, $8D, $3B, $C9, $CD
    db   $91, $08, $20, $03, $CD, $8D, $3B, $1E
    db   $00, $FE, $54, $38, $02, $1E, $04, $7B
    db   $CD, $87, $3B, $C9, $C9, $65, $64, $54
    db   $52, $22, $22, $32, $37, $37, $37, $57
    db   $56, $26, $21, $C4, $C5, $D5, $D4, $C4
    db   $C5, $D5, $D5, $C5, $C4, $C4, $C5, $D5
    db   $D4, $AB, $A9, $AC, $AA, $AB, $A9, $AB
    db   $AA, $AC, $A9, $AB, $A9, $AC, $AE, $CD
    db   $61, $7D, $F0, $F6, $FE, $B4, $20, $07
    db   $AF, $EA, $72, $D4, $EA, $73, $D4, $FA
    db   $73, $D4, $A7, $28, $4C, $FA, $72, $D4
    db   $5F, $50, $21, $53, $62, $19, $FA, $73
    db   $D4, $BE, $20, $2D, $21, $61, $62, $19
    db   $F0, $F6, $BE, $20, $24, $AF, $EA, $73
    db   $D4, $FA, $72, $D4, $3C, $EA, $72, $D4
    db   $FE, $0E, $20, $0D, $AF, $EA, $72, $D4
    db   $3E, $02, $E0, $F2, $D5, $CD, $E0, $62
    db   $D1, $21, $6F, $62, $19, $7E, $C3, $85
    db   $21, $AF, $EA, $72, $D4, $EA, $73, $D4
    db   $3E, $1D, $E0, $F2, $3E, $AD, $CD, $85
    db   $21, $C9, $21, $39, $D7, $36, $C6, $3E
    db   $28, $EA, $16, $D4, $3E, $20, $E0, $CD
    db   $C6, $10, $E0, $D8, $3E, $80, $E0, $CE
    db   $C6, $08, $E0, $D7, $3E, $02, $CD, $53
    db   $09, $CD, $39, $28, $21, $01, $D6, $FA
    db   $00, $D6, $5F, $C6, $0A, $EA, $00, $D6
    db   $16, $00, $19, $F0, $CF, $22, $F0, $D0
    db   $22, $3E, $81, $22, $3E, $68, $22, $3E
    db   $77, $22, $F0, $CF, $22, $F0, $D0, $3C
    db   $22, $3E, $81, $22, $3E, $69, $22, $3E
    db   $4B, $22, $36, $00, $3E, $01, $E0, $AC
    db   $F0, $CD, $E6, $F0, $C6, $10, $E0, $AE
    db   $F0, $CE, $E6, $F0, $C6, $08, $E0, $AD
    db   $F0, $F6, $5F, $16, $00, $21, $00, $D8
    db   $19, $CB, $E6, $C9, $10, $20, $30, $40
    db   $50, $60, $70, $80, $18, $28, $38, $48
    db   $58, $68, $78, $88, $21, $B0, $C2, $09
    db   $7E, $A7, $C2, $E3, $63, $CD, $61, $7D
    db   $CD, $91, $08, $20, $5B, $CD, $ED, $27
    db   $E6, $07, $5F, $50, $21, $5A, $63, $19
    db   $7E, $21, $00, $C2, $09, $77, $21, $52
    db   $63, $19, $7E, $21, $10, $C2, $09, $77
    db   $CD, $6E, $64, $F0, $DA, $FE, $00, $28
    db   $09, $FE, $06, $28, $05, $FE, $09, $28
    db   $01, $C9, $CD, $91, $08, $CD, $ED, $27
    db   $E6, $3F, $C6, $40, $77, $3E, $BF, $1E
    db   $05, $CD, $13, $3C, $38, $1A, $F0, $D7
    db   $21, $00, $C2, $19, $77, $F0, $D8, $21
    db   $10, $C2, $19, $77, $21, $B0, $C2, $19
    db   $36, $01, $21, $40, $C3, $19, $CB, $B6
    db   $C9, $FF, $FF, $FF, $FF, $6C, $00, $6C
    db   $20, $68, $00, $6A, $00, $60, $00, $62
    db   $00, $64, $00, $66, $00, $11, $CF, $63
    db   $CD, $3B, $3C, $CD, $61, $7D, $CD, $83
    db   $7D, $F0, $F0, $C7

    dw JumpTable_63FA_18 ; 00

    db   $03, $64, $29, $64, $5C, $64

JumpTable_63FA_18:
    call toc_01_0891
    ld   [hl], $30
    call JumpTable_3B8D_00
    ret


    db   $CD, $91, $08, $20, $15, $CD, $ED, $27
    db   $E6, $3F, $C6, $70, $77, $CD, $ED, $27
    db   $E6, $07, $C6, $05, $CD, $25, $3C, $CD
    db   $8D, $3B, $1E, $01, $FE, $18, $30, $01
    db   $1C, $7B, $CD, $87, $3B, $C9, $CD, $CD
    db   $7D, $CD, $9E, $3B, $CD, $B4, $3B, $21
    db   $A0, $C2, $09, $7E, $E6, $0F, $20, $05
    db   $CD, $91, $08, $20, $0E, $CD, $91, $08
    db   $36, $30, $CD, $8D, $3B, $21, $40, $C3
    db   $09, $CB, $F6, $F0, $E7, $1F, $1F, $1F
    db   $1F, $E6, $01, $C6, $03, $CD, $87, $3B
    db   $C9, $CD, $91, $08, $CA, $76, $7E, $1E
    db   $01, $FE, $18, $38, $01, $1C, $7B, $CD
    db   $87, $3B, $C9

toc_18_646E:
    push bc
    ld   hl, $C200
    add  hl, bc
    ld   a, [hl]
    sub  a, $01
    ld   [$FFDB], a
    and  %11110000
    ld   [hSwordIntersectedAreaX], a
    swap a
    ld   hl, $C210
    add  hl, bc
    ld   c, a
    ld   a, [hl]
    sub  a, $07
    ld   [$FFDC], a
    and  %11110000
    ld   [hSwordIntersectedAreaY], a
    or   c
    ld   c, a
    ld   b, $00
    ld   hl, $D711
    ld   a, h
    add  hl, bc
    ld   h, a
    pop  bc
    ld   a, [hl]
    ld   [hObjectUnderEntity], a
    ld   e, a
    ld   a, [$DBA5]
    ld   d, a
    call toc_01_29DB
    ld   [$FFDA], a
    ret


    db   $EC, $14, $CD, $C6, $68, $F0, $EA, $FE
    db   $01, $CA, $7C, $7E, $CD, $61, $7D, $CD
    db   $12, $3F, $21, $B0, $C2, $09, $7E, $A7
    db   $20, $06, $34, $CD, $87, $08, $36, $20
    db   $CD, $8C, $08, $28, $1B, $FA, $3E, $C1
    db   $A7, $FE, $01, $20, $05, $21, $F2, $FF
    db   $36, $33, $A7, $20, $0B, $3E, $02, $E0
    db   $A1, $3E, $6A, $E0, $9D, $CD, $90, $69
    db   $CD, $83, $7D, $CD, $E0, $3B, $FA, $3E
    db   $C1, $A7, $20, $03, $CD, $B4, $3B, $CD
    db   $CD, $7D, $CD, $9E, $3B, $CD, $06, $7E
    db   $21, $20, $C3, $09, $35, $35, $35, $21
    db   $10, $C3, $09, $7E, $E6, $80, $E0, $E8
    db   $A7, $28, $09, $70, $21, $20, $C3, $09
    db   $70, $CD, $AF, $3D, $CD, $AB, $65, $CD
    db   $20, $7E, $21, $80, $C3, $09, $73, $CD
    db   $30, $7E, $FE, $00, $28, $0B, $50, $21
    db   $A3, $64, $19, $7E, $21, $50, $C2, $09
    db   $77, $F0, $E8, $A7, $28, $28, $21, $20
    db   $C3, $09, $36, $10, $CD, $ED, $27, $E6
    db   $0F, $D6, $08, $21, $40, $C2, $09, $77
    db   $CD, $20, $7E, $C6, $28, $FE, $50, $38
    db   $0D, $3E, $08, $CD, $30, $3C, $F0, $D8
    db   $21, $40, $C2, $09, $86, $77, $CD, $72
    db   $65, $F0, $E7, $1F, $1F, $1F, $1F, $E6
    db   $01, $CD, $87, $3B, $C9, $CD, $8C, $08
    db   $28, $04, $3E, $03, $18, $19, $CD, $87
    db   $08, $20, $2A, $21, $B0, $C2, $09, $7E
    db   $FE, $05, $30, $05, $34, $3E, $01, $18
    db   $06, $CD, $ED, $27, $E6, $03, $3C

toc_18_6594:
    ld   [$D205], a
    cp   $01
    jr   nz, toc_18_659F

    assign [$FFF4], $0A
toc_18_659F:
    call toc_01_0891
    ld   [hl], $00
    ld   hl, $C3D0
    add  hl, bc
    ld   [hl], $00
    ret


    db   $FA, $05, $D2, $A7, $C8, $D1, $3D, $C7

    dw JumpTable_65C8_18 ; 00

    db   $1F, $66, $A9, $66, $C8, $65, $01, $01
    db   $01, $02, $02, $03, $03, $03, $03, $03
    db   $02, $02, $01

JumpTable_65C8_18:
    call toc_01_0891
    jr   nz, .return_18_65E7

    ld   hl, $C3D0
    add  hl, bc
    ld   a, [hl]
    cp   $0D
    jp   z, .toc_18_65E8

    inc  [hl]
    ld   e, a
    ld   d, b
    ld   hl, $65BB
    add  hl, de
    ld   a, [hl]
    call toc_01_3B87
    call toc_01_0891
    ld   [hl], $01
JumpTable_65C8_18.return_18_65E7:
    ret


JumpTable_65C8_18.toc_18_65E8:
    call toc_01_27ED
    and  %00000011
    jp   z, toc_18_6706

    ld   a, $01
    jp   toc_18_6594

    db   $04, $05, $05, $05, $05, $05, $05, $05
    db   $05, $05, $05, $06, $07, $08, $08, $08
    db   $08, $08, $07, $06, $01, $08, $10, $08
    db   $08, $02, $00, $00, $00, $FC, $F8, $F0
    db   $F8, $E0, $90, $A0, $00, $00, $00, $00
    db   $00, $00, $CD, $91, $08, $20, $30, $21
    db   $D0, $C3, $09, $7E, $FE, $15, $CA, $06
    db   $67, $34, $5F, $50, $21, $F5, $65, $19
    db   $7E, $CD, $87, $3B, $21, $0A, $66, $19
    db   $5E, $21, $80, $C3, $09, $7E, $A7, $20
    db   $04, $7B, $2F, $3C, $5F, $21, $40, $C2
    db   $09, $73, $CD, $91, $08, $36, $03, $C9
    db   $09, $09, $0A, $0A, $0B, $0B, $0C, $0C
    db   $09, $09, $0A, $0A, $0B, $0B, $0C, $0C
    db   $09, $09, $0A, $0A, $0B, $0B, $0C, $0C
    db   $09, $09, $09, $09, $09, $09, $09, $09
    db   $09, $09, $0D, $0E, $0F, $10, $11, $11
    db   $11, $01, $0C, $0C, $0C, $0C, $0C, $0C
    db   $0C, $0C, $08, $08, $08, $08, $08, $08
    db   $08, $08, $00, $00, $00, $00, $00, $00
    db   $00, $00, $00, $00, $00, $00, $00, $00
    db   $00, $00, $F0, $E0, $D0, $C0, $C0, $E0
    db   $F0, $00, $00, $00, $CD, $91, $08, $20
    db   $57, $21, $D0, $C3, $09, $7E, $FE, $2A
    db   $CA, $06, $67, $5F, $FE, $28, $20, $07
    db   $FA, $1C, $C1, $FE, $0A, $28, $01, $34
    db   $50, $21, $55, $66, $19, $7E, $CD, $87
    db   $3B, $21, $7F, $66, $19, $5E, $21, $80
    db   $C3, $09, $7E, $A7, $20, $04, $7B, $2F
    db   $3C, $5F, $21, $40, $C2, $09, $73, $CD
    db   $8C, $08, $28, $17, $CD, $20, $7E, $C6
    db   $30, $FE, $60, $38, $0E, $21, $D0, $C3
    db   $09, $7E, $FE, $18, $30, $05, $3E, $10
    db   $CD, $25, $3C, $CD, $91, $08, $36, $03
    db   $C9

toc_18_6706:
    clear [$D205]
    call toc_01_0887
    call toc_01_27ED
    and  %00001111
    add  a, $0C
    ld   [hl], a
    ret


    db   $00, $F8, $6C, $00, $00, $00, $6E, $00
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $FF, $F8, $6C, $00, $FF, $00, $6E, $00
    db   $00, $00, $64, $00, $00, $08, $66, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $00, $F8, $6E, $20, $00, $00, $6C, $20
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $FD, $F8, $6C, $00, $FD, $00, $6E, $00
    db   $FD, $F0, $6C, $00, $FD, $F8, $6E, $00
    db   $00, $F8, $6E, $20, $00, $00, $6C, $20
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $6E, $20, $00, $08, $6C, $20
    db   $00, $00, $64, $00, $00, $08, $66, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $FD, $08, $6E, $20, $FD, $10, $6C, $20
    db   $00, $00, $68, $00, $00, $08, $6A, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $00, $F8, $6C, $00, $00, $00, $6E, $00
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $00, $F0, $6C, $00, $00, $F8, $6E, $00
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $00, $E8, $6C, $00, $00, $F0, $6E, $00
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $F8, $10, $6C, $00, $F8, $18, $6E, $00
    db   $00, $00, $68, $00, $00, $08, $6A, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $F0, $08, $6C, $00, $F0, $10, $6E, $00
    db   $00, $00, $68, $00, $00, $08, $6A, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $FC, $08, $6E, $20, $FC, $10, $6C, $20
    db   $00, $00, $68, $00, $00, $08, $6A, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $00, $10, $6E, $20, $00, $18, $6C, $20
    db   $00, $00, $68, $00, $00, $08, $6A, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $04, $08, $6E, $20, $04, $10, $6C, $20
    db   $00, $00, $68, $00, $00, $08, $6A, $00
    db   $FD, $F8, $6E, $20, $FD, $00, $6C, $20
    db   $08, $00, $6C, $00, $08, $08, $6E, $00
    db   $00, $00, $64, $00, $00, $08, $66, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $08, $F8, $6C, $00, $08, $00, $6E, $00
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $05, $F0, $6C, $00, $05, $F8, $6E, $00
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $F4, $F0, $6E, $20, $F4, $F8, $6C, $20
    db   $00, $00, $60, $00, $00, $08, $62, $00
    db   $00, $00, $FF, $00, $00, $00, $FF, $00
    db   $3E, $80, $EA, $C0, $D5, $EA, $C2, $D5
    db   $F0, $F1, $CB, $27, $CB, $27, $50, $CB
    db   $27, $5F, $CB, $12, $CB, $27, $CB, $12
    db   $83, $5F, $7A, $CE, $00, $57, $AF, $E0
    db   $E8, $21, $80, $C3, $09, $7E, $A7, $20
    db   $08, $3C, $E0, $E8, $21, $ED, $FF, $CB
    db   $EE, $21, $16, $67, $19, $0E, $06, $E5
    db   $FA, $C0, $C3, $5F, $16, $00, $21, $30
    db   $C0, $19, $E5, $D1, $E1, $79, $E0, $D7
    db   $FA, $23, $C1, $4F, $CD, $87, $3D, $F0
    db   $D7, $4F, $FA, $C2, $D5, $FE, $80, $20
    db   $06, $7E, $C6, $08, $EA, $C2, $D5, $F0
    db   $EC, $86, $12, $23, $13, $C5, $FA, $55
    db   $C1, $4F, $46, $F0, $E8, $A7, $28, $06
    db   $78, $2F, $3C, $C6, $08, $47, $FA, $C0
    db   $D5, $FE, $80, $20, $0B, $F0, $E8, $A7
    db   $78, $20, $02, $C6, $08, $EA, $C0, $D5
    db   $F0, $EE, $80, $91, $12, $23, $13, $C1
    db   $2A, $12, $FE, $FF, $20, $04, $1B, $AF
    db   $12, $13, $13, $F0, $ED, $AE, $23, $12
    db   $13, $0D, $20, $AE, $3E, $08, $EA, $C1
    db   $D5, $3E, $04, $EA, $C3, $D5, $FA, $23
    db   $C1, $4F, $3E, $06, $CD, $D0, $3D, $C3
    db   $19, $3D, $00, $FE, $FD, $FE, $00, $02
    db   $03, $02, $00, $04, $08, $0C, $10, $0C
    db   $08, $04, $21, $10, $C0, $F0, $E7, $1F
    db   $1F, $1F, $F5, $E6, $07, $CD, $A3, $69
    db   $F1, $C6, $04, $E6, $07, $C5, $E5, $5F
    db   $16, $00, $21, $80, $69, $19, $46, $21
    db   $88, $69, $19, $4E, $E1, $F0, $99, $80
    db   $C6, $F6, $22, $F0, $98, $81, $C6, $FC
    db   $22, $36, $24, $23, $36, $00, $23, $C1
    db   $C9, $21, $B0, $C2, $09, $7E, $FE, $02
    db   $CA, $ED, $6E, $A7, $C2, $3E, $6F, $F0
    db   $EA, $FE, $01, $20, $61, $F0, $EE, $E0
    db   $D7, $F0, $EC, $E0, $D8, $3E, $02, $CD
    db   $53, $09, $3E, $0C, $E0, $E8, $CD, $FC
    db   $69, $3E, $F4, $E0, $E8, $CD, $FC, $69
    db   $CD, $88, $3F, $C3, $76, $7E, $3E, $BD
    db   $CD, $01, $3C, $38, $38, $21, $60, $C4
    db   $09, $7E, $21, $60, $C4, $19, $77, $F0
    db   $D7, $21, $00, $C2, $19, $77, $F0, $D8
    db   $21, $10, $C2, $19, $77, $F0, $DA, $21
    db   $10, $C3, $19, $77, $21, $B0, $C2, $19
    db   $36, $01, $F0, $E8, $21, $40, $C2, $19
    db   $77, $21, $E0, $C2, $19, $36, $20, $21
    db   $60, $C3, $19, $36, $01, $C9, $CD, $C9
    db   $6E, $F0, $F6, $21, $E0, $C3, $09, $BE
    db   $28, $0E, $F0, $EE, $FE, $98, $D2, $76
    db   $7E, $F0, $EC, $FE, $70, $D2, $76, $7E
    db   $CD, $61, $7D, $CD, $83, $7D, $CD, $CD
    db   $7D, $CD, $06, $7E, $F0, $F0, $C7

    dw JumpTable_6A75_18 ; 00

    db   $96, $6A, $68, $6B, $A9, $6B, $B9, $6C
    db   $E5, $6C, $36, $6D, $4F, $6D

JumpTable_6A75_18:
    ld   hl, $C360
    add  hl, bc
    ld   [hl], $03
    call toc_01_0891
    ld   [hl], $C0
    ld   hl, $C450
    add  hl, bc
    ld   [hl], $80
    call toc_01_3DAF
    ld   hl, $C240
    add  hl, bc
    ld   [hl], $08
    jp   JumpTable_3B8D_00

    db   $08, $F8, $08, $F8, $CD, $08, $6E, $CD
    db   $20, $7E, $C6, $1C, $FE, $38, $30, $2B
    db   $CD, $40, $7E, $C6, $20, $FE, $40, $30
    db   $22, $3E, $10, $CD, $30, $3C, $F0, $D7
    db   $2F, $3C, $21, $50, $C2, $09, $77, $F0
    db   $D8, $2F, $3C, $21, $40, $C2, $09, $77
    db   $CD, $8D, $3B, $36, $03, $21, $C0, $C2
    db   $09, $36, $FF, $21, $50, $C4, $09, $7E
    db   $A7, $20, $0B, $CD, $8D, $3B, $36, $02
    db   $CD, $91, $08, $36, $20, $C9, $21, $20
    db   $C3, $09, $70, $21, $10, $C3, $09, $7E
    db   $D6, $28, $28, $0D, $1E, $08, $E6, $80
    db   $20, $02, $1E, $F8, $21, $20, $C3, $09
    db   $73, $21, $A0, $C2, $09, $7E, $E6, $03
    db   $28, $12, $5F, $50, $21, $93, $6A, $19
    db   $7E, $21, $50, $C2, $09, $77, $21, $40
    db   $C2, $09, $36, $00, $21, $A0, $C2, $09
    db   $7E, $1F, $1F, $E6, $03, $28, $12, $5F
    db   $50, $21, $91, $6A, $19, $7E, $21, $40
    db   $C2, $09, $77, $21, $50, $C2, $09, $36
    db   $00, $CD, $91, $08, $20, $0E, $CD, $ED
    db   $27, $E6, $7F, $C6, $40, $77, $21, $F0
    db   $C2, $09, $36, $10, $21, $F0, $C2, $09
    db   $7E, $A7, $28, $0C, $FE, $08, $20, $03
    db   $CD, $65, $6D, $3E, $02, $C3, $87, $3B
    db   $CD, $25, $6E, $F0, $E7, $1F, $1F, $1F
    db   $E6, $01, $CD, $87, $3B, $C9, $CD, $91
    db   $08, $20, $33, $CD, $8D, $3B, $36, $03
    db   $F0, $99, $F5, $D6, $14, $E0, $99, $3E
    db   $20, $CD, $25, $3C, $F1, $E0, $99, $21
    db   $20, $C3, $09, $36, $EC, $21, $50, $C4
    db   $09, $36, $30, $CD, $ED, $27, $E6, $03
    db   $21, $C0, $C2, $09, $77, $A7, $20, $05
    db   $CD, $91, $08, $36, $10, $C9, $CD, $A0
    db   $6C, $3E, $02, $CD, $87, $3B, $C9, $21
    db   $C0, $C2, $09, $7E, $FE, $FF, $28, $42
    db   $CD, $20, $7E, $C6, $18, $FE, $30, $30
    db   $39, $CD, $40, $7E, $C6, $18, $FE, $30
    db   $30, $30, $21, $20, $C4, $09, $7E, $A7
    db   $20, $28, $FA, $37, $C1, $A7, $28, $22
    db   $3E, $20, $CD, $30, $3C, $F0, $D7, $2F
    db   $3C, $21, $50, $C2, $09, $77, $F0, $D8
    db   $2F, $3C, $21, $40, $C2, $09, $77, $CD
    db   $91, $08, $36, $0B, $CD, $8D, $3B, $36
    db   $06, $C9, $21, $C0, $C2, $09, $7E, $FE
    db   $FF, $28, $08, $A7, $20, $30, $CD, $91
    db   $08, $20, $2B, $3E, $20, $CD, $30, $3C
    db   $F0, $D7, $2F, $3C, $21, $50, $C2, $09
    db   $96, $E6, $80, $20, $04, $34, $34, $34
    db   $34, $35, $35, $F0, $D8, $2F, $3C, $21
    db   $40, $C2, $09, $96, $E6, $80, $20, $04
    db   $34, $34, $34, $34, $35, $35, $21, $10
    db   $C3, $09, $7E, $FE, $40, $38, $0C, $21
    db   $20, $C3, $09, $7E, $E6, $80, $20, $03
    db   $70, $18, $10, $21, $20, $C3, $09, $F0
    db   $E7, $E6, $01, $20, $01, $34, $7E, $E6
    db   $80, $20, $30, $21, $50, $C4, $09, $7E
    db   $A7, $28, $10, $F0, $EE, $FE, $A8, $30
    db   $0A, $F0, $EC, $FE, $90, $38, $1C, $FE
    db   $C0, $30, $18, $CD, $8D, $3B, $36, $04
    db   $CD, $A0, $6C, $CD, $91, $08, $CD, $ED
    db   $27, $E6, $3F, $C6, $20, $77, $3E, $FF
    db   $C3, $87, $3B, $CD, $B4, $3B, $21, $20
    db   $C4, $09, $7E, $A7, $28, $0A, $CD, $AF
    db   $3D, $21, $C0, $C2, $09, $36, $FF, $C9
    db   $CD, $25, $6E, $C3, $5D, $6B, $CD, $AF
    db   $3D, $21, $20, $C3, $09, $70, $C9, $00
    db   $00, $D0, $D0, $40, $40, $80, $80, $08
    db   $98, $38, $78, $F8, $A8, $F8, $A8, $CD
    db   $91, $08, $20, $26, $21, $10, $C3, $09
    db   $36, $28, $CD, $8D, $3B, $36, $05, $CD
    db   $ED, $27, $E6, $07, $5F, $50, $21, $A9
    db   $6C, $19, $7E, $21, $10, $C2, $09, $77
    db   $21, $B1, $6C, $19, $7E, $21, $00, $C2
    db   $09, $77, $C9, $3E, $08, $CD, $25, $3C
    db   $F0, $EE, $FE, $09, $38, $2F, $FE, $97
    db   $30, $2B, $F0, $EC, $FE, $20, $38, $25
    db   $FE, $70, $30, $21, $CD, $8D, $3B, $36
    db   $01, $21, $50, $C4, $09, $CD, $ED, $27
    db   $E6, $3F, $C6, $20, $77, $21, $40, $C2
    db   $09, $7E, $2F, $3C, $77, $21, $50, $C2
    db   $09, $7E, $2F, $3C, $77, $C3, $5D, $6B
    db   $00, $09, $12, $15, $18, $15, $12, $09
    db   $00, $F7, $EE, $EB, $E8, $EB, $EE, $F7
    db   $00, $09, $12, $15, $CD, $91, $08, $20
    db   $0A, $36, $20, $CD, $8D, $3B, $36, $07
    db   $C3, $A0, $6C, $FE, $08, $38, $03, $CD
    db   $85, $6C, $C3, $5D, $6B, $CD, $91, $08
    db   $20, $0C, $21, $C0, $C2, $09, $36, $FF
    db   $CD, $8D, $3B, $36, $03, $C9, $FE, $08
    db   $C2, $03, $6E, $3E, $0D, $E0, $F4, $F0
    db   $99, $F5, $D6, $08, $E0, $99, $3E, $1F
    db   $CD, $30, $3C, $F1, $E0, $99, $CD, $1B
    db   $7B, $E6, $0F, $E0, $E8, $1E, $00, $CD
    db   $86, $6D, $1E, $01, $F0, $E8, $83, $E6
    db   $0F, $E0, $E8, $1E, $0F, $50, $21, $80
    db   $C2, $19, $7E, $A7, $28, $13, $21, $A0
    db   $C3, $19, $7E, $FE, $BD, $20, $0A, $21
    db   $B0, $C2, $19, $7E, $FE, $02, $20, $01
    db   $04, $1D, $7B, $FE, $FF, $20, $DF, $78
    db   $06, $00, $FE, $03, $30, $4A, $3E, $BD
    db   $CD, $01, $3C, $38, $43, $F0, $D7, $21
    db   $00, $C2, $19, $77, $F0, $D8, $21, $DA
    db   $FF, $96, $21, $10, $C2, $19, $77, $21
    db   $B0, $C2, $19, $36, $02, $21, $40, $C3
    db   $19, $36, $02, $21, $60, $C3, $19, $36
    db   $4C, $C5, $F0, $E8, $4F, $21, $26, $6D
    db   $09, $7E, $21, $40, $C2, $19, $77, $21
    db   $22, $6D, $09, $7E, $21, $50, $C2, $19
    db   $77, $21, $E0, $C2, $19, $36, $20, $C1
    db   $C9, $3E, $02, $C3, $87, $3B, $21, $10
    db   $C2, $09, $7E, $D6, $28, $77, $F0, $EF
    db   $D6, $28, $E0, $EF, $CD, $9E, $3B, $21
    db   $10, $C2, $09, $7E, $C6, $28, $77, $CD
    db   $BA, $3D, $C9, $1E, $0F, $50, $21, $80
    db   $C2, $19, $7E, $FE, $05, $20, $6D, $21
    db   $A0, $C3, $19, $7E, $FE, $03, $28, $08
    db   $FE, $00, $28, $04, $FE, $02, $20, $5C
    db   $21, $00, $C2, $19, $F0, $EE, $96, $C6
    db   $18, $FE, $30, $30, $4F, $21, $10, $C2
    db   $19, $F0, $EC, $96, $C6, $20, $FE, $40
    db   $30, $42, $F0, $99, $F5, $F0, $98, $F5
    db   $7E, $E0, $99, $21, $00, $C2, $19, $7E
    db   $E0, $98, $D5, $3E, $20, $CD, $30, $3C
    db   $D1, $F0, $D8, $2F, $3C, $20, $02, $3E
    db   $20, $21, $40, $C2, $09, $77, $F0, $D7
    db   $2F, $3C, $20, $02, $3E, $20, $21, $50
    db   $C2, $09, $77, $F1, $E0, $98, $F1, $E0
    db   $99, $CD, $8D, $3B, $36, $03, $21, $C0
    db   $C2, $09, $36, $01, $1D, $7B, $FE, $FF
    db   $20, $83, $C9, $00, $FC, $60, $00, $00
    db   $04, $62, $00, $00, $0C, $60, $20, $00
    db   $FC, $64, $00, $00, $04, $66, $00, $00
    db   $0C, $64, $20, $00, $FC, $68, $00, $00
    db   $04, $6A, $00, $00, $0C, $68, $20, $F0
    db   $F1, $FE, $FF, $C8, $17, $17, $E6, $FC
    db   $5F, $17, $E6, $F8, $83, $5F, $50, $21
    db   $A5, $6E, $19, $0E, $03, $CD, $26, $3D
    db   $C3, $19, $3D, $1E, $00, $1E, $60, $1E
    db   $40, $1E, $20, $11, $E5, $6E, $CD, $3B
    db   $3C, $CD, $61, $7D, $CD, $E2, $08, $F0
    db   $E7, $1F, $1F, $E6, $01, $CD, $87, $3B
    db   $CD, $EB, $3B, $CD, $BF, $3B, $38, $15
    db   $21, $10, $C4, $09, $7E, $A7, $28, $10
    db   $F0, $EE, $E0, $D7, $F0, $EC, $E0, $D8
    db   $3E, $02, $CD, $53, $09, $C3, $76, $7E
    db   $CD, $CD, $7D, $CD, $91, $08, $C0, $CD
    db   $9E, $3B, $21, $A0, $C2, $09, $7E, $A7
    db   $C2, $76, $7E, $C9, $6C, $00, $6C, $20
    db   $6E, $00, $6E, $20, $11, $36, $6F, $CD
    db   $3B, $3C, $CD, $61, $7D, $CD, $83, $7D
    db   $CD, $CD, $7D, $F0, $E7, $E6, $03, $20
    db   $10, $21, $10, $C3, $09, $7E, $D6, $10
    db   $28, $07, $E6, $80, $28, $02, $34, $34
    db   $35, $F0, $E7, $1F, $1F, $1F, $E6, $01
    db   $CD, $87, $3B, $F0, $F0, $C7

    dw JumpTable_6F76_18 ; 00

    db   $84, $6F, $94, $6F

JumpTable_6F76_18:
    call toc_01_0891
    jr   nz, .return_18_6F83

    ld   [hl], $20
    call toc_01_3DAF
    call JumpTable_3B8D_00
JumpTable_6F76_18.return_18_6F83:
    ret


    db   $CD, $91, $08, $20, $0A, $36, $20, $3E
    db   $20, $CD, $25, $3C, $CD, $8D, $3B, $C9
    db   $CD, $B4, $3B, $CD, $91, $08, $C0, $CD
    db   $9E, $3B, $21, $A0, $C2, $09, $7E, $A7
    db   $C2, $76, $7E, $C9, $21, $B0, $C2, $09
    db   $7E, $A7, $C2, $66, $71, $21, $40, $C3
    db   $09, $CB, $F6, $CD, $44, $71, $CD, $0E
    db   $38, $CD, $12, $3F, $CD, $61, $7D, $FA
    db   $8F, $C1, $A7, $28, $31, $21, $D0, $C2
    db   $09, $7E, $A7, $20, $09, $34, $3E, $25
    db   $CD, $97, $21, $C3, $2B, $7F, $FE, $01
    db   $20, $05, $3E, $3F, $E0, $F4, $34, $21
    db   $20, $C3, $09, $36, $20, $CD, $06, $7E
    db   $21, $10, $C3, $09, $7E, $FE, $78, $D8
    db   $CD, $BD, $27, $C3, $76, $7E, $F0, $F0
    db   $C7

    dw JumpTable_700B_18 ; 00

    db   $13, $70, $2B, $70, $67, $70, $DC, $70
    db   $F8, $70, $0C, $71

JumpTable_700B_18:
    assign [$D205], $07
    jp   JumpTable_3B8D_00

    db   $CD, $91, $08, $36, $80, $AF, $EA, $01
    db   $D2, $EA, $02, $D2, $FA, $05, $D2, $3C
    db   $E6, $07, $EA, $05, $D2, $C3, $8D, $3B
    db   $CD, $91, $08, $20, $2A, $36, $FF, $21
    db   $30, $C4, $09, $CB, $8E, $1E, $0F, $50
    db   $21, $A0, $C3, $19, $7E, $FE, $BC, $20
    db   $0D, $21, $B0, $C2, $19, $7E, $A7, $28
    db   $05, $21, $80, $C2, $19, $70, $1D, $7B
    db   $FE, $FF, $20, $E4, $C3, $8D, $3B, $C9
    db   $78, $68, $58, $48, $38, $28, $00, $00
    db   $00, $00, $00, $00, $CD, $91, $08, $20
    db   $0A, $21, $30, $C4, $09, $CB, $CE, $CD
    db   $8D, $3B, $AF, $E6, $1F, $20, $55, $21
    db   $D0, $C3, $09, $7E, $FE, $06, $30, $4C
    db   $3E, $BC, $CD, $01, $3C, $38, $45, $3E
    db   $31, $E0, $F2, $21, $D0, $C3, $09, $C5
    db   $4E, $34, $21, $5B, $70, $09, $7E, $21
    db   $00, $C2, $19, $77, $21, $61, $70, $09
    db   $7E, $21, $10, $C2, $19, $77, $21, $10
    db   $C3, $19, $36, $1C, $21, $D0, $C3, $19
    db   $71, $21, $30, $C4, $19, $7E, $E6, $7B
    db   $77, $21, $60, $C3, $19, $36, $01, $21
    db   $B0, $C2, $19, $36, $01, $21, $40, $C3
    db   $19, $CB, $F6, $C1, $F0, $E7, $1F, $1F
    db   $1F, $1F, $1F, $E6, $01, $CD, $87, $3B
    db   $C9, $FA, $01, $D2, $FE, $06, $20, $11
    db   $21, $D0, $C3, $09, $70, $AF, $EA, $01
    db   $D2, $CD, $91, $08, $36, $40, $CD, $8D
    db   $3B, $CD, $CF, $70, $C9, $CD, $91, $08
    db   $20, $0E, $3E, $FF, $EA, $01, $D2, $21
    db   $50, $C4, $09, $36, $40, $CD, $8D, $3B
    db   $C9, $21, $50, $C4, $09, $7E, $A7, $20
    db   $05, $CD, $8D, $3B, $36, $01, $3E, $02
    db   $CD, $87, $3B, $C9, $C9, $00, $F8, $60
    db   $00, $00, $00, $62, $00, $00, $08, $64
    db   $00, $00, $F8, $66, $00, $00, $00, $62
    db   $00, $00, $08, $64, $00, $10, $00, $68
    db   $00, $00, $00, $62, $00, $00, $08, $64
    db   $00, $F0, $F1, $17, $17, $E6, $FC, $5F
    db   $CB, $27, $83, $5F, $50, $21, $20, $71
    db   $19, $0E, $03, $CD, $26, $3D, $3E, $01
    db   $C3, $D0, $3D, $6E, $00, $6E, $20, $6E
    db   $40, $6E, $60, $11, $5E, $71, $CD, $3B
    db   $3C, $CD, $61, $7D, $CD, $E2, $08, $F0
    db   $F0, $C7

    dw JumpTable_71DF_18 ; 00

    db   $4C, $72, $69, $72, $8C, $72, $B9, $72
    db   $28, $38, $48, $58, $68, $78, $38, $68
    db   $48, $58, $48, $58, $18, $88, $28, $78
    db   $60, $40, $28, $78, $78, $28, $60, $40
    db   $28, $78, $28, $78, $50, $50, $38, $68
    db   $50, $50, $38, $68, $38, $68, $38, $68
    db   $38, $68, $28, $78, $38, $48, $68, $58
    db   $20, $30, $40, $40, $30, $20, $60, $60
    db   $50, $70, $70, $50, $38, $38, $58, $58
    db   $70, $70, $30, $30, $70, $70, $50, $50
    db   $30, $70, $70, $30, $30, $70, $40, $60
    db   $70, $30, $60, $40, $30, $30, $50, $50
    db   $70, $70, $40, $40, $50, $40, $50, $40

JumpTable_71DF_18:
    ld   a, [hLinkPositionX]
    push af
    ld   a, [hLinkPositionY]
    push af
    ld   a, [$D205]
    rla
    and  %11111110
    ld   e, a
    rla
    and  %11111100
    add  a, e
    ld   hl, $C3D0
    add  hl, bc
    add  a, [hl]
    ld   e, a
    ld   d, b
    ld   hl, $717F
    add  hl, de
    ld   a, [hl]
    ld   [hLinkPositionX], a
    ld   hl, $71AF
    add  hl, de
    ld   a, [hl]
    ld   [hLinkPositionY], a
    ld   a, [hFrameCounter]
    xor  c
    and  %00000011
    jr   nz, .else_18_7211

    ld   a, $10
    call toc_01_3C25
JumpTable_71DF_18.else_18_7211:
    ld   hl, $FFEE
    ld   a, [hLinkPositionX]
    sub  a, [hl]
    add  a, $03
    cp   6
    jr   nc, .else_18_7230

    ld   hl, $FFEC
    ld   a, [hLinkPositionY]
    sub  a, [hl]
    add  a, $03
    cp   6
    jr   nc, .else_18_7230

    incAddr $D201
    call JumpTable_3B8D_00
JumpTable_71DF_18.else_18_7230:
    pop  af
    ld   [hLinkPositionY], a
    pop  af
    ld   [hLinkPositionX], a
    call toc_18_7DCD
    ld   a, [hFrameCounter]
    rra
    rra
    rra
    and  %00000001
    call toc_01_3B87
    ret


    db   $04, $0C, $14, $1C, $24, $2C, $34, $3C
    db   $FA, $01, $D2, $FE, $FF, $20, $13, $21
    db   $D0, $C3, $09, $5E, $50, $21, $44, $72
    db   $19, $7E, $21, $50, $C4, $09, $77, $CD
    db   $8D, $3B, $C3, $39, $72, $21, $50, $C4
    db   $09, $7E, $A7, $20, $18, $21, $40, $C3
    db   $09, $CB, $B6, $3E, $20, $CD, $25, $3C
    db   $21, $20, $C3, $09, $36, $F4, $3E, $31
    db   $E0, $F2, $CD, $8D, $3B, $C3, $39, $72
    db   $CD, $B4, $3B, $CD, $36, $72, $CD, $06
    db   $7E, $F0, $E7, $E6, $03, $20, $0A, $21
    db   $20, $C3, $09, $7E, $FE, $0C, $28, $01
    db   $34, $F0, $EC, $FE, $88, $30, $05, $F0
    db   $EE, $FE, $A8, $D8, $CD, $8D, $3B, $3E
    db   $FF, $CD, $87, $3B, $C9, $C9, $7A, $10
    db   $7E, $30, $7A, $30, $7E, $10, $7C, $10
    db   $7C, $30, $F0, $F8, $E6, $20, $C2, $76
    db   $7E, $21, $B0, $C2, $09, $7E, $A7, $28
    db   $20, $11, $BA, $72, $CD, $D0, $3C, $CD
    db   $61, $7D, $CD, $CD, $7D, $CD, $06, $7E
    db   $21, $20, $C3, $09, $35, $35, $21, $10
    db   $C3, $09, $7E, $E6, $80, $C2, $76, $7E
    db   $C9, $21, $20, $C4, $09, $7E, $A7, $28
    db   $04, $3E, $07, $E0, $F1, $CD, $3B, $76
    db   $F0, $F0, $A7, $20, $1F, $FA, $4A, $DB
    db   $FE, $02, $20, $18, $FA, $66, $C1, $A7
    db   $28, $12, $CD, $8D, $3B, $21, $30, $C4
    db   $09, $CB, $FE, $CB, $D6, $21, $60, $C3
    db   $09, $36, $10, $C9, $F0, $EA, $FE, $05
    db   $28, $15, $CD, $7C, $7E, $21, $80, $C2
    db   $09, $7E, $A7, $20, $09, $21, $10, $D8
    db   $CB, $EE, $3E, $02, $E0, $F2, $C9, $CD
    db   $61, $7D, $CD, $E2, $08, $CD, $EB, $3B
    db   $F0, $F0, $FE, $05, $30, $05, $CD, $AF
    db   $7C, $18, $03, $CD, $BF, $3B, $F0, $F0
    db   $C7

    dw JumpTable_7375_18 ; 00

    db   $76, $73, $89, $73, $D3, $73, $42, $74
    db   $64, $74, $8F, $74, $A0, $74, $B7, $74
    db   $EC, $74, $08, $75, $1C, $75

JumpTable_7375_18:
    ret


    db   $CD, $91, $08, $36, $80, $3E, $39, $EA
    db   $68, $D3, $E0, $B0, $E0, $BD, $E0, $BF
    db   $C3, $8D, $3B, $F0, $EE, $21, $40, $C4
    db   $09, $77, $F0, $EC, $21, $D0, $C2, $09
    db   $D6, $14, $77, $CD, $91, $08, $20, $06
    db   $36, $FF, $CD, $8D, $3B, $C9, $1E, $08
    db   $E6, $04, $28, $02, $1E, $F8, $21, $40
    db   $C2, $09, $73, $CD, $DA, $7D, $C9, $F8
    db   $08, $10, $00, $00, $08, $F0, $00, $F0
    db   $00, $F0, $F0, $F8, $08, $08, $F8, $F8
    db   $08, $FC, $02, $FC, $02, $FC, $FC, $10
    db   $10, $10, $10, $10, $10, $CD, $91, $08
    db   $20, $06, $36, $80, $CD, $8D, $3B, $C9
    db   $E6, $1F, $20, $5F, $F0, $F1, $FE, $06
    db   $28, $4E, $3E, $13, $E0, $F4, $3E, $7F
    db   $CD, $01, $3C, $C5, $F0, $F1, $4F, $21
    db   $B0, $C3, $19, $77, $21, $B5, $73, $09
    db   $F0, $D7, $86, $21, $00, $C2, $19, $77
    db   $21, $BB, $73, $09, $F0, $D8, $86, $21
    db   $10, $C2, $19, $77, $21, $C1, $73, $09
    db   $7E, $21, $40, $C2, $19, $77, $21, $C7
    db   $73, $09, $7E, $21, $50, $C2, $19, $77
    db   $21, $CD, $73, $09, $7E, $21, $20, $C3
    db   $19, $77, $21, $B0, $C2, $19, $77, $C1
    db   $21, $B0, $C3, $09, $7E, $FE, $07, $28
    db   $02, $3C, $77, $C9, $CD, $91, $08, $20
    db   $05, $36, $80, $C3, $8D, $3B, $1E, $07
    db   $FE, $60, $30, $0C, $FE, $40, $30, $09
    db   $FE, $30, $38, $04, $FE, $20, $38, $01
    db   $1C, $7B, $CD, $87, $3B, $C9, $CD, $91
    db   $08, $20, $1C, $36, $40, $21, $40, $C3
    db   $09, $CB, $BE, $21, $30, $C4, $09, $CB
    db   $B6, $CD, $8D, $3B, $F0, $EE, $EA, $01
    db   $D2, $F0, $EC, $EA, $02, $D2, $C9, $21
    db   $50, $C2, $09, $36, $04, $CD, $D0, $7D
    db   $C9, $CD, $91, $08, $20, $0B, $36, $20
    db   $21, $40, $C2, $09, $36, $08, $CD, $8D
    db   $3B, $C9, $CD, $91, $08, $20, $0E, $CD
    db   $91, $08, $CD, $ED, $27, $E6, $1F, $C6
    db   $08, $77, $CD, $8D, $3B, $CD, $DA, $7D
    db   $C9, $CD, $91, $08, $20, $2F, $21, $90
    db   $C3, $09, $34, $7E, $FE, $03, $38, $13
    db   $CD, $ED, $27, $E6, $01, $20, $0C, $CD
    db   $8D, $3B, $3E, $09, $77, $CD, $91, $08
    db   $36, $20, $C9, $CD, $91, $08, $36, $40
    db   $CD, $8D, $3B, $35, $35, $21, $40, $C2
    db   $09, $7E, $2F, $3C, $77, $C9, $CD, $91
    db   $08, $20, $16, $36, $20, $3E, $18, $CD
    db   $25, $3C, $21, $50, $C2, $09, $7E, $CB
    db   $7E, $28, $03, $2F, $3C, $77, $CD, $8D
    db   $3B, $C9, $21, $20, $C4, $09, $7E, $A7
    db   $20, $05, $CD, $91, $08, $20, $03, $CD
    db   $8D, $3B, $CD, $CD, $7D, $C9, $F0, $98
    db   $F5, $F0, $99, $F5, $FA, $01, $D2, $E0
    db   $98, $FA, $02, $D2, $E0, $99, $3E, $08
    db   $CD, $25, $3C, $FA, $01, $D2, $21, $EE
    db   $FF, $96, $C6, $01, $FE, $02, $30, $17
    db   $FA, $02, $D2, $21, $EC, $FF, $96, $C6
    db   $01, $FE, $02, $30, $0A, $CD, $8D, $3B
    db   $36, $06, $CD, $91, $08, $36, $20, $F1
    db   $E0, $99, $F1, $E0, $98, $CD, $CD, $7D
    db   $C9, $F0, $F8, $7A, $10, $F0, $00, $7C
    db   $10, $F0, $08, $7C, $30, $F0, $10, $7A
    db   $30, $00, $00, $7E, $10, $00, $08, $7E
    db   $30, $F0, $F8, $70, $00, $F0, $00, $7C
    db   $10, $F0, $08, $7C, $30, $F0, $10, $7A
    db   $30, $00, $00, $7E, $10, $00, $08, $7E
    db   $30, $F0, $F8, $70, $00, $F0, $00, $7C
    db   $10, $F0, $08, $7C, $30, $F0, $10, $7A
    db   $30, $00, $00, $7E, $10, $00, $08, $74
    db   $20, $F0, $F8, $70, $00, $F0, $00, $7C
    db   $10, $F0, $08, $7C, $30, $F0, $10, $70
    db   $20, $00, $00, $7E, $10, $00, $08, $74
    db   $20, $F0, $F8, $70, $00, $F0, $00, $7C
    db   $10, $F0, $08, $7C, $30, $F0, $10, $70
    db   $20, $00, $00, $74, $00, $00, $08, $74
    db   $20, $F0, $F8, $70, $00, $F0, $00, $78
    db   $00, $F0, $08, $7C, $30, $F0, $10, $70
    db   $20, $00, $00, $74, $00, $00, $08, $74
    db   $20, $F0, $F8, $70, $00, $F0, $00, $78
    db   $00, $F0, $08, $78, $20, $F0, $10, $70
    db   $20, $00, $00, $74, $00, $00, $08, $74
    db   $20, $F0, $F8, $70, $00, $F0, $00, $78
    db   $00, $F0, $08, $78, $20, $F0, $10, $70
    db   $20, $00, $00, $74, $00, $00, $08, $74
    db   $20, $F0, $F8, $70, $00, $F0, $00, $72
    db   $00, $F0, $08, $72, $20, $F0, $10, $70
    db   $20, $00, $00, $74, $00, $00, $08, $74
    db   $20, $76, $00, $76, $20, $F0, $F1, $17
    db   $17, $17, $E6, $F8, $5F, $17, $83, $5F
    db   $50, $21, $5F, $75, $19, $0E, $06, $CD
    db   $26, $3D, $3E, $06, $CD, $D0, $3D, $F0
    db   $EA, $FE, $01, $28, $07, $F0, $F0, $FE
    db   $05, $DA, $F7, $76, $21, $40, $C4, $09
    db   $7E, $E0, $E8, $F0, $EE, $96, $CB, $2F
    db   $E0, $E1, $CB, $2F, $E0, $E2, $CB, $2F
    db   $E0, $E3, $CB, $2F, $E0, $E4, $CB, $2F
    db   $E0, $E5, $CB, $2F, $E0, $E6, $21, $D0
    db   $C2, $09, $7E, $E0, $E9, $F0, $EC, $D6
    db   $20, $BE, $38, $65, $E0, $EC, $AF, $E0
    db   $F1, $21, $E1, $FF, $F0, $E8, $86, $E0
    db   $EE, $23, $E5, $11, $37, $76, $CD, $3B
    db   $3C, $FA, $C7, $DB, $A7, $20, $3B, $21
    db   $EC, $FF, $F0, $99, $96, $C6, $0C, $FE
    db   $18, $30, $2F, $21, $EE, $FF, $F0, $98
    db   $96, $5F, $C6, $0C, $FE, $18, $30, $22
    db   $7B, $1E, $20, $E6, $80, $28, $02, $1E
    db   $E0, $7B, $E0, $9A, $AF, $E0, $9B, $3E
    db   $18, $EA, $3E, $C1, $3E, $10, $EA, $C7
    db   $DB, $3E, $08, $EA, $94, $DB, $3E, $03
    db   $E0, $F3, $E1, $F0, $E9, $5F, $F0, $EC
    db   $D6, $10, $E0, $EC, $93, $E6, $80, $28
    db   $A3, $CD, $BA, $3D, $C9, $62, $00, $64
    db   $00, $60, $00, $60, $20, $64, $20, $62
    db   $20, $66, $00, $68, $00, $60, $00, $60
    db   $20, $68, $20, $66, $20, $6C, $00, $6E
    db   $00, $6A, $00, $6A, $20, $6E, $20, $6C
    db   $20, $00, $01, $02, $01, $03, $04, $05
    db   $04, $06, $07, $08, $07, $11, $FB, $76
    db   $CD, $3B, $3C, $CD, $61, $7D, $CD, $83
    db   $7D, $CD, $B4, $3B, $F0, $F0, $C7

    dw JumpTable_774B_18 ; 00

    db   $A5, $77, $FA, $FC, $00, $04, $06, $04
    db   $00, $FC, $FA, $FC

JumpTable_774B_18:
    call toc_01_0891
    jr   nz, .else_18_7770

    call toc_01_27ED
    and  %00111111
    add  a, $30
    ld   [hl], a
    and  %00000111
    ld   e, a
    ld   d, b
    ld   hl, $7743
    add  hl, de
    ld   a, [hl]
    ld   hl, $C240
    add  hl, bc
    ld   [hl], a
    ld   hl, $7741
    add  hl, de
    ld   a, [hl]
    ld   hl, $C250
    add  hl, bc
    ld   [hl], a
JumpTable_774B_18.else_18_7770:
    call toc_18_7DCD
    call toc_01_3B9E
    ld   hl, $C2B0
    add  hl, bc
    ld   a, [hl]
    ld   hl, $771F
    and  a
    jr   z, .else_18_7796

    call toc_18_7D0E
    jr   nc, .else_18_7793

    ld   hl, $C2C0
    add  hl, bc
    ld   a, [hl]
    and  %00000011
    add  a, $7C
    inc  [hl]
    call toc_01_218E
JumpTable_774B_18.else_18_7793:
    ld   hl, $7727
JumpTable_774B_18.else_18_7796:
    ld   a, [hFrameCounter]
    rra
    rra
    rra
    and  %00000011
    ld   e, a
    ld   d, b
    add  hl, de
    ld   a, [hl]
    call toc_01_3B87
    ret


    db   $CD, $91, $08, $20, $05, $CD, $8D, $3B
    db   $70, $C9, $21, $23, $77, $CD, $96, $77
    db   $C9, $00, $FC, $70, $00, $00, $04, $72
    db   $00, $00, $0C, $70, $20, $00, $FC, $74
    db   $00, $00, $04, $72, $00, $00, $0C, $74
    db   $20, $00, $FC, $76, $00, $00, $04, $72
    db   $00, $00, $0C, $76, $20, $00, $FC, $74
    db   $00, $00, $04, $72, $00, $00, $0C, $74
    db   $20, $10, $11, $12, $11, $F0, $F1, $17
    db   $17, $E6, $FC, $5F, $17, $E6, $F8, $83
    db   $5F, $50, $21, $B6, $77, $19, $0E, $03
    db   $CD, $26, $3D, $CD, $61, $7D, $CD, $19
    db   $3D, $21, $D0, $C3, $09, $7E, $1F, $1F
    db   $1F, $E6, $03, $5F, $50, $21, $E6, $77
    db   $19, $7E, $21, $10, $C3, $09, $77, $CD
    db   $83, $7D, $CD, $CD, $7D, $CD, $9E, $3B
    db   $F0, $F0, $C7

    dw JumpTable_7838_18 ; 00

    db   $0B, $79, $1C, $79, $F8, $FA, $00, $06
    db   $08, $06, $00, $FA, $F8, $FA

JumpTable_7838_18:
    call toc_01_0891
    jr   nz, .else_18_786F

    call toc_01_27ED
    and  %00011111
    add  a, $20
    ld   [hl], a
    and  %00000111
    ld   e, a
    ld   d, b
    ld   hl, $7830
    add  hl, de
    ld   a, [hl]
    ld   hl, $C240
    add  hl, bc
    ld   [hl], a
    ld   hl, $782E
    add  hl, de
    ld   a, [hl]
    ld   hl, $C250
    add  hl, bc
    ld   [hl], a
    ld   hl, $C2B0
    add  hl, bc
    inc  [hl]
    ld   a, [hl]
    and  %00000111
    jr   nz, .else_18_786C

    ld   a, $0A
    call toc_01_3C25
JumpTable_7838_18.else_18_786C:
    call JumpTable_3B8D_00
JumpTable_7838_18.else_18_786F:
    ld   hl, $C3D0
    add  hl, bc
    ld   a, [hl]
    inc  [hl]
    and  %01111111
    jr   nz, .else_18_78BA

    ld   a, $02
    call toc_01_3C01
    jr   c, .else_18_78BA

    ld   hl, $C430
    add  hl, de
    res  0, [hl]
    ld   a, [$FFD7]
    ld   hl, $C200
    add  hl, de
    ld   [hl], a
    ld   a, [$FFD8]
    ld   hl, $C210
    add  hl, de
    ld   [hl], a
    ld   a, [$FFDA]
    ld   hl, $C310
    add  hl, de
    ld   [hl], a
    ld   hl, $C320
    add  hl, de
    ld   [hl], $08
    ld   hl, $C2E0
    add  hl, de
    ld   [hl], $40
    ld   hl, $C440
    add  hl, de
    ld   [hl], $01
    push bc
    push de
    pop  bc
    ld   a, $10
    call toc_01_3C25
    pop  bc
    assign [$FFF2], $08
JumpTable_7838_18.else_18_78BA:
    call toc_18_7E4F
    ld   a, [hLinkDirection]
    xor  $01
    cp   e
    jr   nz, .else_18_78FE

    call toc_18_7E20
    add  a, $20
    cp   $40
    jr   nc, .else_18_78FE

    call toc_18_7E40
    add  a, $20
    cp   $40
    jr   nc, .else_18_78FE

    ifNot [$C137], .else_18_78FE

    call JumpTable_3B8D_00
    ld   [hl], $02
    call toc_01_0891
    ld   [hl], $12
    ld   a, $20
    call toc_01_3C30
    ld   a, [$FFD7]
    cpl
    inc  a
    ld   hl, $C250
    add  hl, bc
    ld   [hl], a
    ld   a, [$FFD8]
    cpl
    inc  a
    ld   hl, $C240
    add  hl, bc
    ld   [hl], a
    ret


JumpTable_7838_18.else_18_78FE:
    call toc_01_3BB4
    ld   a, [hFrameCounter]
    rra
    rra
    and  %00000011
    call toc_01_3B87
    ret


    db   $CD, $91, $08, $20, $09, $36, $20, $CD
    db   $8D, $3B, $70, $CD, $AF, $3D, $C3, $6F
    db   $78, $CD, $91, $08, $20, $04, $CD, $8D
    db   $3B, $70, $C3, $01, $79, $6C, $74, $6D
    db   $75, $64, $74, $65, $75, $CD, $8A, $7A
    db   $CD, $61, $7D, $F0, $F0, $A7, $C2, $02
    db   $7A, $CD, $91, $08, $CA, $EB, $79, $FE
    db   $07, $C2, $EE, $79, $C5, $21, $00, $C2
    db   $09, $7E, $C6, $07, $D6, $08, $E6, $F0
    db   $E0, $CE, $CB, $37, $21, $10, $C2, $09
    db   $4F, $7E, $C6, $07, $D6, $10, $E6, $F0
    db   $E0, $CD, $B1, $4F, $06, $00, $21, $11
    db   $D7, $7C, $09, $C5, $D1, $67, $C1, $7E
    db   $E0, $AF, $FE, $D3, $28, $04, $FE, $5C
    db   $20, $1C, $FA, $A5, $DB, $A7, $20, $16
    db   $CD, $A6, $20, $F0, $EE, $E0, $D7, $F0
    db   $EC, $E0, $D8, $3E, $02, $CD, $53, $09
    db   $3E, $2F, $E0, $F2, $18, $52, $FA, $A5
    db   $DB, $A7, $CA, $EE, $79, $F0, $AF, $FE
    db   $AB, $20, $5B, $36, $AC, $54, $5D, $21
    db   $B0, $C2, $09, $72, $21, $C0, $C2, $09
    db   $73, $21, $90, $C2, $09, $36, $01, $CD
    db   $87, $08, $36, $80, $21, $00, $C2, $09
    db   $F0, $CE, $77, $21, $10, $C2, $09, $F0
    db   $CD, $77, $21, $A2, $C1, $34, $FA, $CD
    db   $C3, $A7, $28, $05, $D6, $04, $EA, $CD
    db   $C3, $CD, $91, $08, $70, $3E, $12, $E0
    db   $F4, $11, $28, $79, $D5, $C3, $A7, $7A
    db   $C3, $76, $7E, $FE, $10, $30, $0F, $21
    db   $40, $C4, $09, $7E, $A7, $C0, $3E, $09
    db   $EA, $9E, $C1, $CD, $F6, $3B, $C9, $CD
    db   $87, $08, $20, $3A, $21, $00, $C2, $09
    db   $7E, $E0, $CE, $21, $10, $C2, $09, $7E
    db   $E0, $CD, $21, $B0, $C2, $09, $56, $21
    db   $C0, $C2, $09, $5E, $3E, $AB, $12, $CD
    db   $76, $7E, $F0, $F6, $FE, $74, $C8, $21
    db   $A2, $C1, $35, $FA, $CD, $C3, $FE, $0C
    db   $30, $05, $C6, $04, $EA, $CD, $C3, $11
    db   $2C, $79, $D5, $C3, $A7, $7A, $C9, $06
    db   $FE, $24, $00, $03, $04, $24, $10, $05
    db   $0A, $24, $00, $05, $FE, $24, $10, $02
    db   $04, $24, $00, $04, $0A, $24, $10, $03
    db   $FF, $24, $00, $01, $04, $24, $10, $02
    db   $09, $24, $00, $01, $00, $24, $10, $FF
    db   $04, $24, $00, $00, $06, $24, $10, $00
    db   $01, $24, $00, $FE, $03, $24, $10, $FF
    db   $05, $24, $00, $FF, $01, $24, $10, $FD
    db   $03, $24, $00, $FE, $05, $24, $10, $CD
    db   $91, $08, $28, $17, $1F, $1F, $E6, $07
    db   $CB, $27, $CB, $27, $5F, $CB, $27, $83
    db   $5F, $50, $21, $42, $7A, $19, $0E, $03
    db   $CD, $26, $3D, $C9, $CD, $39, $28, $FA
    db   $00, $D6, $5F, $16, $00, $21, $01, $D6
    db   $19, $C6, $0A, $EA, $00, $D6, $D1, $F0
    db   $CF, $22, $F0, $D0, $22, $3E, $81, $22
    db   $1A, $13, $22, $1A, $13, $22, $F0, $CF
    db   $22, $F0, $D0, $3C, $22, $3E, $81, $22
    db   $1A, $13, $22, $1A, $22, $AF, $77, $C9
    db   $00, $00, $01, $01, $01, $02, $02, $02
    db   $00, $00, $0F, $0F, $0F, $0E, $0E, $0E
    db   $08, $08, $07, $07, $07, $06, $06, $06
    db   $08, $08, $09, $09, $09, $0A, $0A, $0A
    db   $04, $04, $03, $03, $03, $02, $02, $02
    db   $0C, $0C, $0D, $0D, $0D, $0E, $0E, $0E
    db   $04, $04, $05, $05, $05, $06, $06, $06
    db   $0C, $0C, $0B, $0B, $0B, $0A, $0A, $0A
    db   $F0, $D7, $07, $E6, $01, $5F, $F0, $D8
    db   $07, $17, $E6, $02, $B3, $17, $17, $17
    db   $E6, $18, $67, $F0, $D8, $CB, $7F, $28
    db   $02, $2F, $3C, $57, $F0, $D7, $CB, $7F
    db   $28, $02, $2F, $3C, $BA, $30, $0D, $CB
    db   $2F, $CB, $2F, $84, $5F, $50, $21, $DB
    db   $7A, $19, $7E, $C9, $7A, $CB, $2F, $CB
    db   $2F, $84, $5F, $50, $21, $FB, $7A, $19
    db   $7E, $C9, $11, $10, $0F, $0E, $3E, $02
    db   $E0, $A1, $EA, $A4, $C1, $EA, $C6, $C1
    db   $79, $3C, $EA, $A6, $C1, $AF, $CD, $3B
    db   $09, $EA, $3E, $C1, $F0, $9E, $5F, $16
    db   $00, $21, $5D, $7B, $19, $7E, $E0, $9D
    db   $CD, $40, $7C, $CD, $61, $7D, $F0, $E7
    db   $E6, $03, $20, $04, $3E, $0B, $E0, $F4
    db   $F0, $F0, $A7, $28, $18, $3E, $30, $CD
    db   $30, $3C, $F0, $D7, $2F, $3C, $E0, $9B
    db   $F0, $D8, $2F, $3C, $E0, $9A, $C5, $CD
    db   $D6, $20, $C1, $18, $0D, $CD, $CD, $7D
    db   $CD, $91, $08, $20, $13, $3E, $30, $CD
    db   $25, $3C, $CD, $D5, $3B, $30, $63, $AF
    db   $EA, $C6, $C1, $CD, $76, $7E, $18, $5A
    db   $3E, $06, $EA, $9E, $C1, $CD, $F6, $3B
    db   $21, $A0, $C2, $09, $7E, $A7, $20, $4B
    db   $CD, $9E, $3B, $FA, $A5, $DB, $A7, $28
    db   $41, $CD, $6E, $64, $21, $50, $C2, $09
    db   $7E, $A7, $28, $36, $1E, $9E, $CB, $7F
    db   $20, $02, $1E, $9F, $F0, $AF, $BB, $20
    db   $29, $3E, $68, $CD, $01, $3C, $21, $00
    db   $C2, $19, $F0, $CE, $C6, $08, $77, $21
    db   $10, $C2, $19, $F0, $CD, $C6, $10, $77
    db   $F0, $AF, $FE, $9E, $3E, $00, $28, $01
    db   $3C, $21, $80, $C3, $19, $77, $CD, $91
    db   $08, $70, $C9, $CD, $91, $08, $70, $3E
    db   $07, $E0, $F2, $F0, $EE, $E0, $D7, $F0
    db   $EC, $E0, $D8, $3E, $05, $CD, $53, $09
    db   $C9, $36, $00, $36, $20, $11, $3C, $7C
    db   $CD, $3B, $3C, $F0, $EE, $21, $98, $FF
    db   $96, $CB, $2F, $CB, $2F, $E0, $D7, $E0
    db   $D9, $F0, $EF, $21, $99, $FF, $96, $CB
    db   $2F, $CB, $2F, $E0, $D8, $E0, $DA, $FA
    db   $C0, $C3, $5F, $16, $00, $21, $30, $C0
    db   $19, $E5, $D1, $3E, $03, $E0, $DB, $21
    db   $E7, $FF, $AE, $E6, $01, $20, $07, $F0
    db   $99, $21, $D8, $FF, $86, $12, $13, $F0
    db   $98, $21, $D7, $FF, $86, $C6, $04, $12
    db   $13, $3E, $24, $12, $13, $3E, $00, $12
    db   $13, $F0, $D7, $21, $D9, $FF, $86, $E0
    db   $D7, $F0, $D8, $21, $DA, $FF, $86, $E0
    db   $D8, $F0, $DB, $3D, $20, $C7, $3E, $03
    db   $CD, $D0, $3D, $C9, $CD, $D5, $3B, $30
    db   $1F, $CD, $4A, $09, $CD, $42, $09, $FA
    db   $A6, $C1, $A7, $28, $11, $5F, $50, $21
    db   $9F, $C3, $19, $7E, $FE, $03, $20, $06
    db   $21, $8F, $C2, $19, $36, $00, $37, $C9
    db   $A7, $C9, $06, $04, $02, $00, $21, $80
    db   $C3, $09, $5E, $50, $21, $D5, $7C, $19
    db   $E5, $21, $D0, $C3, $09, $34, $7E, $1F
    db   $1F, $1F, $1F, $E1, $E6, $01, $B6, $C3
    db   $87, $3B

toc_18_7CF5:
    ld   e, b
    ld   a, [hLinkPositionY]
    ld   hl, $FFEF
    sub  a, [hl]
    add  a, $18
    cp   56
    jr   toc_18_7D0E.toc_18_7D19

toc_18_7D02:
    ld   a, [hLinkPositionY]
    ld   hl, $FFEF
    sub  a, [hl]
    add  a, $14
    cp   56
    jr   toc_18_7D0E.toc_18_7D19

toc_18_7D0E:
    ld   e, b
    ld   a, [hLinkPositionY]
    ld   hl, $FFEF
    sub  a, [hl]
    add  a, $14
    cp   40
toc_18_7D0E.toc_18_7D19:
    jr   nc, .else_18_7D5F

    ld   a, [hLinkPositionX]
    ld   hl, $FFEE
    sub  a, [hl]
    add  a, $10
    cp   32
    jr   nc, .else_18_7D5F

    inc  e
    ifEq [$FFEB], $C4, .else_18_7D3A

    push de
    call toc_18_7E4F
    ld   a, [hLinkDirection]
    xor  $01
    cp   e
    pop  de
    jr   nz, .else_18_7D5F

toc_18_7D0E.else_18_7D3A:
    ld   hl, $C1AD
    ld   [hl], $01
    ld   a, [wDialogState]
    ld   hl, $C14F
    or   [hl]
    ld   hl, $C146
    or   [hl]
    ld   hl, $C134
    or   [hl]
    jr   nz, .else_18_7D5F

    ifNe [$DB9A], $80, .else_18_7D5F

    ld   a, [$FFCC]
    and  %00010000
    jr   z, .else_18_7D5F

    scf
    ret


toc_18_7D0E.else_18_7D5F:
    and  a
    ret


toc_18_7D61:
    ifNe [$FFEA], $05, .else_18_7D81

    ifEq [wGameMode], GAMEMODE_WORLD_MAP, .else_18_7D81

    ld   hl, $C1A8
    ld   a, [wDialogState]
    or   [hl]
    ld   hl, $C14F
    or   [hl]
    jr   nz, .else_18_7D81

    ifNot [$C124], .return_18_7D82

toc_18_7D61.else_18_7D81:
    pop  af
toc_18_7D61.return_18_7D82:
    ret


    db   $21, $10, $C4, $09, $7E, $A7, $28, $41
    db   $3D, $77, $CD, $B8, $3E, $21, $40, $C2
    db   $09, $7E, $F5, $21, $50, $C2, $09, $7E
    db   $F5, $21, $F0, $C3, $09, $7E, $21, $40
    db   $C2, $09, $77, $21, $00, $C4, $09, $7E
    db   $21, $50, $C2, $09, $77, $CD, $CD, $7D
    db   $21, $30, $C4, $09, $7E, $E6, $20, $20
    db   $03, $CD, $9E, $3B, $21, $50, $C2, $09
    db   $F1, $77, $21, $40, $C2, $09, $F1, $77
    db   $F1, $C9

toc_18_7DCD:
    call toc_18_7DDA
toc_18_7DCD.toc_18_7DD0:
    push bc
    ld   a, c
    add  a, $10
    ld   c, a
    call toc_18_7DDA
    pop  bc
    ret


toc_18_7DDA:
    ld   hl, $C240
    add  hl, bc
    ld   a, [hl]
    and  a
    jr   z, .return_18_7E05

    push af
    swap a
    and  %11110000
    ld   hl, $C260
    add  hl, bc
    add  a, [hl]
    ld   [hl], a
    rl   d
    ld   hl, $C200
    add  hl, bc
    pop  af
    ld   e, $00
    bit  7, a
    jr   z, .else_18_7DFC

    ld   e, $F0
toc_18_7DDA.else_18_7DFC:
    swap a
    and  %00001111
    or   e
    rr   d
    adc  [hl]
    ld   [hl], a
toc_18_7DDA.return_18_7E05:
    ret


    db   $21, $20, $C3, $09, $7E, $A7, $28, $F7
    db   $F5, $CB, $37, $E6, $F0, $21, $30, $C3
    db   $09, $86, $77, $CB, $12, $21, $10, $C3
    db   $18, $D2

toc_18_7E20:
    ld   e, $00
    ld   a, [hLinkPositionX]
    ld   hl, $C200
    add  hl, bc
    sub  a, [hl]
    bit  7, a
    jr   z, .else_18_7E2E

    inc  e
toc_18_7E20.else_18_7E2E:
    ld   d, a
    ret


toc_18_7E30:
    ld   e, $02
    ld   a, [hLinkPositionY]
    ld   hl, $C210
    add  hl, bc
    sub  a, [hl]
    bit  7, a
    jr   nz, .else_18_7E3E

    inc  e
toc_18_7E30.else_18_7E3E:
    ld   d, a
    ret


toc_18_7E40:
    ld   e, $02
    ld   a, [hLinkPositionY]
    ld   hl, $FFEC
    sub  a, [hl]
    bit  7, a
    jr   nz, .else_18_7E4D

    inc  e
toc_18_7E40.else_18_7E4D:
    ld   d, a
    ret


toc_18_7E4F:
    call toc_18_7E20
    ld   a, e
    ld   [$FFD7], a
    ld   a, d
    bit  7, a
    jr   z, .else_18_7E5C

    cpl
    inc  a
toc_18_7E4F.else_18_7E5C:
    push af
    call toc_18_7E30
    ld   a, e
    ld   [$FFD8], a
    ld   a, d
    bit  7, a
    jr   z, .else_18_7E6A

    cpl
    inc  a
toc_18_7E4F.else_18_7E6A:
    pop  de
    cp   d
    jr   nc, .else_18_7E72

    ld   a, [$FFD7]
    jr   .toc_18_7E74

toc_18_7E4F.else_18_7E72:
    ld   a, [$FFD8]
toc_18_7E4F.toc_18_7E74:
    ld   e, a
    ret


toc_18_7E76:
    ld   hl, $C280
    add  hl, bc
    ld   [hl], b
    ret


    db   $21, $C0, $C2, $09, $7E, $C7

    dw JumpTable_7E88_18 ; 00

    db   $99, $7E, $AA, $7E

JumpTable_7E88_18:
    call toc_01_0891
    ld   [hl], $A0
    ld   hl, $C420
    add  hl, bc
    ld   [hl], $FF
    ld   hl, $C2C0
    add  hl, bc
    inc  [hl]
    ret


    db   $CD, $91, $08, $20, $0B, $36, $C0, $21
    db   $20, $C4, $09, $36, $FF, $CD, $93, $7E
    db   $C9, $CD, $91, $08, $20, $0C, $CD, $D7
    db   $08, $CD, $BD, $27, $CD, $2B, $7F, $C3
    db   $7A, $3F, $CD, $BF, $7E, $C9, $E6, $07
    db   $20, $1D, $CD, $ED, $27, $E6, $1F, $D6
    db   $10, $5F, $21, $EE, $FF, $86, $77, $CD
    db   $ED, $27, $E6, $1F, $D6, $14, $5F, $21
    db   $EC, $FF, $86, $77, $CD, $E1, $7E, $C9
    db   $CD, $67, $7D, $F0, $EE, $E0, $D7, $F0
    db   $EC, $E0, $D8, $3E, $02, $CD, $53, $09
    db   $3E, $13, $E0, $F4, $C9, $3E, $36, $CD
    db   $01, $3C, $F0, $D7, $21, $00, $C2, $19
    db   $77, $F0, $D8, $21, $10, $C2, $19, $77
    db   $F0, $F9, $A7, $28, $08, $21, $50, $C2
    db   $09, $36, $F0, $18, $0C, $21, $20, $C3
    db   $19, $36, $10, $21, $10, $C3, $19, $36
    db   $08, $CD, $76, $7E, $21, $F4, $FF, $36
    db   $1A, $C9, $21, $00, $D8, $F0, $F6, $5F
    db   $FA, $A5, $DB, $57, $F0, $F7, $FE, $1A
    db   $30, $05, $FE, $06, $38, $01, $14, $19
    db   $7E, $F6, $20, $77, $E0, $F8, $C9, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
    db   $FF, $FF, $FF, $FF, $FF, $FF, $FF
